Admin Panel 2: MySQL Server Configuration: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
(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...)
(No difference)

Revision as of 17:56, 26 June 2008

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:

Start the servers by double-clicking on Server_Start.bat (in folder Uniform Server)
2 Your browser will start and display apanel.
Note: You can run apanel at anytime by typing the following into your browser http://localhost/apanel/
3 A) With apanel displayed scroll down to the Configurations section of the left menu. Click MySQL Server Configuration at the bottom of this section.
4 B) The MySQL Server Configuration page is displayed.
5 C) Type in the new MySQL Password.
6 D) Click Change
7 Stop the servers by double-clicking on Stop.bat (in folder Uniform Server)
8 Note: The password will updated when the servers are re-started.

 

Top

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:

  1. Start both servers.
  2. Start apanel (type http://localhost/apanel/ into browser address bar)
  3. Click phpMyAdmin (left menu)
  4. Type fred into Create new database and click create button
  5. Select privileges the User overview page is displayed
  6. Click on Add new user (The Add a new User page is displayed)
  7. Login Information:
  1. User name: Use text field: Type in mpg
  2. Host: Drop down menu select Local
  3. Password: Use text field: Type in mpg123
  4. Re-type: mpg123
  5. Click GO to create the new user (page reloads and expands)
  1. Scroll down the page to Database-specific privileges
  2. From the drop down menu select the database fred (opens Database-specific privileges page)
  3. In the data column check all four privileges Select, Insert, Update and Delete then press GO
  4. Click Home and then click then on reload privileges this executes SQL flush privileges

Top

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

Top


Ric