This guide provides step-by-step instructions on how to set the password for Mysql on your Mvixbox WDN-2000 and create a database.
Required Software: Putty SSH Client
Purpose: Login to the Mvixbox WDN-2000 via ssh, assign a password for the mysql user, create a database, and create a user.
Using mysql on your Mvixbox:
- Use Putty.exe to connect to your Mvixbox. Use the Mvix Knowledge Base Article in order to ssh into the Mvixbox WDN-2000 if you are unsure on how to do this.
- Login as sysadmin, and use the appropriate password for that account.
-
Once connected you will need to run the following command, to log into mysql: mysql -u root -p mysql <enter>
- Now you can set the password with these commands:
use mysql;
update user set password=PASSWORD("NEWPASSWORD") where User='root'; (Replace NEWPASSWORD with your password)
flush privledges;
quit
You want to ensure that you see that rows were changed, as you see in the picture below. This means that the password has changed. You must use the flush privledges command to put the new password into effect.
- You can list databases by running the command: show databases;
- You can create a database by running the command: create database databasename <replace databasename with the name of your database>
- To add a mysql user, and give permission to access the database use the command: grant CREATE,INSERT,DELETE,UPDATE,SELECT on testdatabase.* to user1@localhost; <replace user1 with the username>
- You will need to create a password for the new sql user: set password for user1@localhost = password('NEWPASSWORD'); <replace NEWPASSWORD with the new password>
- You have now set the mysql root password, created a new database, create a new user for the database, and set the password for that user.
Problems, Questions, Corrections:
If you have any further questions, problems, or corrections you would like to see made, please upon a support ticket at http://www.mvixusa.com/support/