Hey I've been trying to set up a mySQL server today, and I can get so far, but keep getting a problem, I've never done anything like this before so I'm quite happy to accept that I'm missing something easy, but any help would be gratefully received. I'm running Suse 7.1 Brgds, Alud ---------------------------------------------------------------------------- - amy:~/mysql-3.23.37-pc-linux-gnu-i686 # ./bin/mysqladmin -u root -p password ******** Enter password: ******** /bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: YES)' --------------------------------- So then I try and check that the server is there: --------------------------------- amy:~/mysql-3.23.37-pc-linux-gnu-i686 # ./bin/mysqladmin version ./bin/mysqladmin Ver 8.19 Distrib 3.23.37, for pc-linux-gnu on i686 Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 3.23.37 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /tmp/mysql.sock Uptime: 59 min 37 sec Threads: 1 Questions: 5 Slow queries: 0 Opens: 6 Flush tables: 1 Open tables: 0 Queries per second avg: 0.001
On Mon, 7 May 2001, Alud wrote:
I've been trying to set up a mySQL server today, and I can get so far, but keep getting a problem, I've never done anything like this before so I'm quite happy to accept that I'm missing something easy, but any help would be gratefully received.
I'm running Suse 7.1
Brgds, Alud ---------------------------------------------------------------------------- -
amy:~/mysql-3.23.37-pc-linux-gnu-i686 # ./bin/mysqladmin -u root -p password ******** Enter password: ********
/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: YES)'
--------------------------------- So then I try and check that the server is there: ---------------------------------
amy:~/mysql-3.23.37-pc-linux-gnu-i686 # ./bin/mysqladmin version
./bin/mysqladmin Ver 8.19 Distrib 3.23.37, for pc-linux-gnu on i686 Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license
Server version 3.23.37 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /tmp/mysql.sock Uptime: 59 min 37 sec
Threads: 1 Questions: 5 Slow queries: 0 Opens: 6 Flush tables: 1 Open tables: 0 Queries per second avg: 0.001
Seems like the MySQL server does not accept your password, then. Are you sure it is correct? It is not the same as the root user's login password! Be default, there is no MySQL password for the root user at all. Does it work, if you provide no password? Bye, LenZ -- ------------------------------------------------------------------ Lenz Grimmer SuSE GmbH mailto:grimmer@suse.de Schanzaeckerstr. 10 http://www.suse.de/~grimmer/ 90443 Nuernberg, Germany Veni, Vidi, VISA.
On Monday 07 May 2001 1:29 am, Alud wrote:
I've been trying to set up a mySQL server today, and I can get so far, but keep getting a problem, I've never done anything like this before so I'm quite happy to accept that I'm missing something easy, but any help would be gratefully received. amy:~/mysql-3.23.37-pc-linux-gnu-i686 # ./bin/mysqladmin -u root -p password ******** Enter password: ******** /bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: YES)'
Hi Lenz' point is worth checking, and I also assume you have run mysql_install_db to set up the MySQL tables. If you have set a password and you still have no access, you probably need to change the grants. MySQL sets up TWO root accesses: root@hostname, and root@localhost, but it only seems to apply the password to the former. You could try stopping mysqld, and then restarting it with: mysqld --skip-grant-tables I THINK this means that MySQL will start without any password security (MySQL experts, correct me if I'm wrong.) Then run: mysql which should take you into the monitor. Then run: grant all on *.* to root@localhost identified by "password"; This should give full control over all databases and tables to root@localhost. Check by running: select host, user, password from user; You should see a list of the users, their hosts, and their passwords. You can then stop mysqld and restart it normally. Hopefully, this time you should have access. You can then give other users control over other databases and tables, eg: mysql -uroot -pwhatever grant all on database.* to user@localhost identified by "password"; grant insert on database.table to user2@hostname identified by "password"; and so on. Let me know how you get on. Kevin
participants (3)
-
Alud
-
Kevin Donnelly
-
Lenz Grimmer