Guys,
Just installed 11.2 and am loving it. However, I need mysql working and have run into the following problem.
First I start up the server:
Chopper@chopper:~> sudo /etc/init.d/mysql start
root's password:
Starting service MySQL done
Then I open up the command line and try to log in as the root user:
$ mysql -u root -p
Then, since I have yet set up the root password, I just press enter and I am logged into mysql and see the following:
Chopper@chopper:~> mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.36-log SUSE MySQL RPM
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.00 sec)
mysql>
As you can see, I don’t seem to have privileges to the mysql table with users and what not.
This is confirmed when I try to select the mysql database as the active database:
mysql> use mysql;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
mysql>
Anybody know why this is happening? I ran mysql in openSUSE 11.1 fine, and have it running on my ubuntu server as well.
FWIW, if I try to run the mysql_secure_installation script, my output is the following:
Chopper@chopper:~> mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
ERROR 1142 (42000) at line 1: UPDATE command denied to user ''@'localhost' for table 'user'
Password update failed!
Anybody?
Thanks,
Joe