Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,315
Rep:
mysql problems
First, I decided to set a password by reading the documentation. So I set it to 1234. Now it won't let me use mysql anymore, it won't accept that password.
I type mysql -u root 1234 and I get access denied. I tried mysql -u root -p 1234 then it asks for a password, so I put that, access denied again. Why is it doing this?
Another problem, I installed phpmyadmin, but when I open it I get this error:
Fatal error: Call to undefined function: mysql_get_client_info() in /var/www/html/phpmyadmin/libraries/defines.lib.php on line 47
Why? I'm running php 4.2.2 and phpmyadmin requires php 4.1.something.
I'm not sure what version of mysql I'm running because of the first problem, it won't let me do the mysql -v command. It just says access denied.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,315
Original Poster
Rep:
Tried all of that, still not working. Here's a typical session:
[root@borg root]# mysql
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
[root@borg root]# mysql -uroot-p1234
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16 to server version: 3.23.52
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select * from mysql;
ERROR 1046: No Database Selected
mysql> \u mysql
ERROR 1044: Access denied for user: '@localhost' to database 'mysql'
mysql> set password for root = password("");
ERROR 1044: Access denied for user: '@localhost' to database 'mysql'
Even once I log in, it's still complaining that I don't have permission, that's what I don't get. If I did mysql -uroot-p1234 the first time, why does it not get the point that I logged in and let me do what I need?
Also, I installed phpmyadmin, but when I open it I get this error:
Fatal error: Call to undefined function: mysql_get_client_info() in /var/www/html/phpmyadmin/libraries/defines.lib.php on line 47
Why is it using functions that don't exist? Do I need to install some kind of library or something?
Hm. OK, did you install from an rpm or did you install from source? If you installed from rpm, the various set-up scripts should have been run for you, but if you installed from source, you need to run the scripts (see the install documentation for details). Those scripts set up the initial root permissions. The MySQL site has a section on access denied errors and I'd be real tempted to run through some of the tests their. If this doesn't clear up, you could also run mysqld with the --skip-grant-tables flag. That should give root complete access to the databases.
Finally, I'm not familiar with the /u syntax. Does plain old use mysql work?
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,315
Original Poster
Rep:
I did not install it, it's the same one that comes with red hat. the /u is to use the database, I have not tried use, I guess it's the same thing. I just typed help and it said /u. I'll try the --skip-grant-tables thing and see what happens.
Originally posted by Red Squirrel I did not install it, it's the same one that comes with red hat. the /u is to use the database, I have not tried use, I guess it's the same thing. I just typed help and it said /u. I'll try the --skip-grant-tables thing and see what happens.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.