Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
FYI, I don't know about the newest versions of mysql, but mysql comes default with an anonymous user with the user name of nothing - there is no value for this user's name. I highly recommend getting rid of this user and to create a password for the mysql root user.
This is the method I prefer since mysql will have 3 entries per mysql user for different domains of access.
1st, run the mysql command (you can do this as your system's regular user):
Code:
[shell prompt] $ mysql -u root
2nd, choose the mysql database:
mysql> use mysql;
You can then run the mysql commands below to remove the anonymous user and to add a password for the mysql root user.
Removing the anonymous user:
Code:
mysql> DELETE FROM mysql.user
-> WHERE User='';
mysql> FLUSH PRIVILEGES;
Setting the root password.
Code:
mysql> UPDATE user SET Password = PASSWORD('new_password_here')
-> WHERE User = 'root';
mysql> FLUSH PRIVILEGES;
Now whenever you want to use mysql you will need to use the -p flag.
you don't need any password to run the mysql server. You only need passwords when you want to use mysql.
again, to start the mysql server, su into your system's root user account with su and then run the command:
mysqld_safe &
that will start the server.
None of your system's regular users will know your system's root user's password.
to access mysql, you can in your regular user account use:
[shell prompt] $ mysql -u root -p
then enter the mysql's root user's password (You need to set the mysql root user's password first though). This will be hidden in the shell. No one but you will know this password either.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.