Labels

Monday, 14 April 2014

[MYSQL] #1045 error And reset password

iff you actually have set a root password and you've just lost/forgotten it:
  1. Stop MySQL: sudo /etc/init.d/mysql start or mysql start
  2. Restart it manually with the skip-grant-tables option:  mysqld_safe --skip-grant-tables
  3. Run the MySQL client: mysql -u root
  4. Reset the root password manually with this MySQL command: UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
  5. Flush the privileges with this MySQL command: FLUSH PRIVILEGES;
From http://www.tech-faq.com/reset-mysql-password.shtml
(Maybe this isn't what you need, Abs, but I figure it could be useful for people stumbling across this question in the future)

source:  http://stackoverflow.com/questions/489119/mysql-error-1045-access-denied

[TOMCAT] Unable to set localhost

# sudo vim /etc/hosts 
 If /etc/hosts doesn't containt the definition of the hostname it fails. Just add your hostname to /etc/host for example if your hostname is work add or modified the following line:

127.0.0.1   work        localhost
 
source: http://stackoverflow.com/questions/4969156/error-java-net-unknownhostexception 

[ALL SYSTEM] Setup JAVA_HOME

Login as root user

vim /etc/profile

Set JAVA_HOME as follows using syntax export JAVA_HOME=<path-to-jdk>

If your jdk path is set to /usr/java/jdk1.5.0_07, add this command to file:

export JAVA_HOME=/usr/java/jdk1.5.0_07

Set PATH as follows:

export PATH=$PATH:$JAVA_HOME/bin

 then save file as following step:

step 1: press esc key on keyboard

step 2: press : key  on keyboard

step 3: type command w

step 4: press enter key on keyboard

After saving successfully run following command to force the system load that file profile again.

. /etc/profile  

 

  Run command java -version to check if successful

[SUSE] start apache2, mysql


APACHE2:
linux-8wi2:~ # /etc/init.d/apache2 start
redirecting to systemctl start apache2.service
linux-8wi2:~ # 


MYSQL:
linux-8wi2:~ # /etc/init.d/mysql start
redirecting to systemctl start mysql.service
linux-8wi2:~ #

source:http://www.cyberciti.biz/faq/linux-start-apache/