saint_jude
July 11th, 2008, 02:55 PM
I cannot login to mysql via the commandline in Ubuntu Server 8.04.1. I re-installed the system to make sure there were no configuration errors. (I installed Ubuntu Server 8.04 i386 from disc, then ran 'apt-get upgrade')
I have a php app (osticket) installed that uses the database successfully as 'root' user. However, when attempting to login to the mysql commandline using 'mysql -u root' I experience the error in this wiki post - https://help.ubuntu.com/community/MysqlPasswordReset
After performing the steps in that wiki post, the error is still not resolved. I have reset the password and then restarted MySQL and i cannot login as admin. The php app (osticket) still works and connects to mysql successfully.
I have also performed these steps with AppArmor disabled.
nonroot@osthelpdesk:~$ mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
nonroot@osthelpdesk:~$ sudo /etc/init.d/mysql stop
[sudo] password for nonroot:
* Stopping MySQL database server mysqld [ OK ]
nonroot@osthelpdesk:~$ sudo /usr/sbin/mysqld --skip-grant-tables
080711 14:37:38 InnoDB: Started; log sequence number 0 43655
080711 14:37:38 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.51a-3ubuntu5.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
nonroot@osthelpdesk:~$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
Query OK, 3 rows affected (0.02 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> exit
Bye
nonroot@osthelpdesk:~$ sudo /etc/init.d/mysql stop
[sudo] password for nonroot:
* Stopping MySQL database server mysqld [ OK ]
nonroot@osthelpdesk:~$ sudo /etc/init.d/mysql start
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
nonroot@osthelpdesk:~$ sudo mysql -u root -password password
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
nonroot@osthelpdesk:~$ sudo mysql -u root -password 'password'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
nonroot@osthelpdesk:~$
I have a php app (osticket) installed that uses the database successfully as 'root' user. However, when attempting to login to the mysql commandline using 'mysql -u root' I experience the error in this wiki post - https://help.ubuntu.com/community/MysqlPasswordReset
After performing the steps in that wiki post, the error is still not resolved. I have reset the password and then restarted MySQL and i cannot login as admin. The php app (osticket) still works and connects to mysql successfully.
I have also performed these steps with AppArmor disabled.
nonroot@osthelpdesk:~$ mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
nonroot@osthelpdesk:~$ sudo /etc/init.d/mysql stop
[sudo] password for nonroot:
* Stopping MySQL database server mysqld [ OK ]
nonroot@osthelpdesk:~$ sudo /usr/sbin/mysqld --skip-grant-tables
080711 14:37:38 InnoDB: Started; log sequence number 0 43655
080711 14:37:38 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.51a-3ubuntu5.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
nonroot@osthelpdesk:~$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
Query OK, 3 rows affected (0.02 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> exit
Bye
nonroot@osthelpdesk:~$ sudo /etc/init.d/mysql stop
[sudo] password for nonroot:
* Stopping MySQL database server mysqld [ OK ]
nonroot@osthelpdesk:~$ sudo /etc/init.d/mysql start
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
nonroot@osthelpdesk:~$ sudo mysql -u root -password password
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
nonroot@osthelpdesk:~$ sudo mysql -u root -password 'password'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
nonroot@osthelpdesk:~$