Admin Panel 2: MySQL Server Configuration: Difference between revisions
(New page: {{Uc_nav_apanel2}} This page allows you to set-up the MySQL password. please note that you must shutdown the server using the Stop.bat file and then re-start the server again. <table bord...) |
(Removed excess category tags) |
||
Line 124: | Line 124: | ||
[[Category: UniCenter]] | [[Category: UniCenter]] | ||
Latest revision as of 10:17, 21 June 2013
Admin Panel 2 |
This page allows you to set-up the MySQL password. please note that you must shutdown the server using the Stop.bat file and then re-start the server again.
Name | Default value | |
MySQL Password: | root | This form displays current settings, which is “root” default |
Configuration
The MySQL server requires a new password the default is known and compromises the security of your server. Uniform server makes it very easy to change, choose a password with strong security. The ideal is a minimum of eight characters in length with a mixture of upper and lower letters and digits. (Allowed characters (a to z and A to Z and 0 to 9 Do not use any other characters).
Set the password as follows:
|
|
Adding new users to MySQL server
If you are sharing your MySQL server create new users and restrict access. You can create new users either using CLI or preferably phpMyAdmin. I have shown an example for each below:
How to use MySQL console (CLI)
First make sure you have started both Apache and MySQL servers.
Start a cmd prompt start > run > type in cmd > click OK
In this window type the following text highlighted in black.
C:\Documents and Settings\work3>w:
W:\>cd usr\local\mysql\bin
W:\usr\local\mysql\bin>mysql -uroot -proot
mysql>CREATE DATABASE fred;
Query OK, 1 row affected (0.00 sec)
mysql>GRANT SELECT,INSERT,UPDATE,DELETE ON fred.* TO 'mpg'@'localhost'IDENTIFIED BY 'mpg123';
Query OK, 0 rows affected (0.00 sec)
mysql>FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.02 sec)
mysql>exit
First two lines navigate to the folder containing mysql executable file (program). This file is run with two parameters user root and password root. (If you have changed the root password use that instead).
A mysql prompt is displayed allowing you to enter SQL instructions the first one creates a database named fred.
The next line sets the privileges and creates a user named mpg with password mpg123 finally the most import line flush privileges this instructs MySQL to make and use the changes.
The last line exit ends the program.
Most programmers like to show off their prowess at the keyboard I find the whole process nauseating and prefer to use phpMyAdmin.
How to use phpMyAdmin
My skills at the keyboard are such that entering long lines of code at a command prompt is a recipe for disaster hence I favor phpMyAdmin.
The following instructions show how easy it is to use phpMyAdmin:
- Start both servers.
- Start apanel (type http://localhost/apanel/ into browser address bar)
- Click phpMyAdmin (left menu)
- Type fred into Create new database and click create button
- Select privileges the User overview page is displayed
- Click on Add new user (The Add a new User page is displayed)
- Login Information:
- User name: Use text field: Type in mpg
- Host: Drop down menu select Local
- Password: Use text field: Type in mpg123
- Re-type: mpg123
- Click GO to create the new user (page reloads and expands)
- Scroll down the page to Database-specific privileges
- From the drop down menu select the database fred (opens Database-specific privileges page)
- In the data column check all four privileges Select, Insert, Update and Delete then press GO
- Click Home and then click then on reload privileges this executes SQL flush privileges
Lost Password
When things go horribly wrong for example you have hacked Uniform Server to death and find you have locked yourself out of the MySQL server all is not lost. I have done this on several occasions a friend has a similar problem hence I wrote the following guide MySQL Lost Password.
Back to Apanel Introduction
Ric |