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.
I am getting frustrated with MySQL. I have installed RH8.0 that comes with the MySQL Server. I am using Webmin-1.100 to configure and running the MySQL Server.
I am able to run the MySQL Server without password as root. I tried to create a password for root using the following command:
I have noticed that the hostname is root@localhost, is that normal ?
I intention of using the MySQL Server is for my existing database and has the username as mysql. I have created the new account as mysql and unable to set a password for it [ using the module config in Webmin ]. No matter how many times I specify the username and password, it does not register as I can login without the password. It also does not allow me to access the database after login without a password.
My questions are:
1. How can I create a new username and password?
2. After creating it, how can I link this username and password with my existing database?
If anyone can help, I am greatly grateful! Thanks!
Err.. as I am very new to MySQL, I am a little blur on what you have said. I should have no problem in creating a new database.
I do not understand about run mysql as root to grant all permission for the new database. Do you know the command?
Logon to mysql as root with no password (you are able to do this yes?)
mysql -u root mysql
The reason you can logon to mysql as root without a password is that there's a default entry in the mysql user table for root with no password. At the mysql prompt
UPDATE user SET password=PASSWORD('password') WHERE user='root';
Then at the prompt...
GRANT ALL ON *.* TO mysql@localhost IDENTIFIED BY 'password';
will create the user mysql for you.
I also like to delete the root user with the wildcard host to make sure root can only logon to mysql while on the localhost.
After trying out what you have said. It is still unable to connect with the database. Even though I have grant all permission and rights using Webmin for the user [mysql], it is still unable to connect with the database.
Is there a simple example where I can test a sample of database with the mysql ? It is getting frustrating as I am re-installing the entire RH8.0 more than 8 times already. I am really confused with the mysql as I have no exprience with it.
Also, I tried installing phpMyAdmin but couldn't get it running.
After trying out what you have said. It is still unable to connect with the database. Even though I have grant all permission and rights using Webmin for the user [mysql], it is still unable to connect with the database.
Erm.. unable to connect from where? The command line, or from within a PHP script like Webmin? If you mean your script can't connect to the database check that you have mysql support installed for PHP. The package is php-mysql or something very close to that. I know that RedHat does NOT install it by default, so PHP can't connect to mysql databases... get an error mentioning mysqlp_connect().
I have enable from the service of the RH8.0 to run MySQL. I have installed Webmin-1.100 to activate the MySQL to start or stop.
I am using PHP to try and connect with my database but it simply refused to do so. After many attempts of re-installing and trying to get it running with password, it still can't work.
Now I am deciding to upgrade the current version of 3.25 to 4.0 but unsure of which one to download as I am new to Linux. I look at the MySQL site and found that there are so many version of mysql, so which one do I need to download for RH8.0?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.