PDA

View Full Version : Can't create mysql db or users??



samfraser
7th February 2007, 06:49 PM
I've downloaded and installed mysql server through yumex but I can't create any users or databases. The manual says I should login using this command but I get an error

mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I can log in using the user that the server is running as but still can't create a database, any ideas?

mysql -u mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15 to server version: 5.0.27

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database brochsecure;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'brochsecure'
mysql>
:mad:

zivko_sudarski
8th February 2007, 08:47 PM
[zivko@mail ~]$ su -
Password:
[root@mail ~]# service mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
[root@mail ~]# rpm -qa|grep mysql
mysql-administrator-1.1.10-3.fc6
mysql-5.0.27-1.fc6
mysql-server-5.0.27-1.fc6
mysql-gui-common-1.1.10-3.fc6
php-mysql-5.1.6-3.3.fc6
mysql-query-browser-1.1.18-4.fc6
[root@mail ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.27

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


mysql> exit
Bye
if not then :
yum update mysql
service mysqld start