MySQL is a real multi-user, multi-thread SQL database server and one of the most popular open source database servers. According to data from the MySQL project, there are currently 4 million MySQL users. Familiar websites that use MySQL include Yahoo, Finance, MP3.com, Motorola, NASA, Silicon Graphics, and Texas Instruments.
Generally, you can use MySQL as a command line. Many users have been using graphical user interface GUI in Windows to operate and manage databases, and may not be used to the command line method. Many new users feel that MySQL is not easy to master. To facilitate the management of MySQL databases, some graphical user management projects are already in progress, including MySQL Control CenterMySQLCC, MySQLGUI, and phpMyAdmin. In addition, you can use the OpenOffice provided by Red Hat to perform graphical Management of MySQL.
Install MySQL
Install the MySQL server before installing, setting, and applying graphical management tools. Run the following command to check whether MySQL is installed on the local machine:
# Rpm-qa | grep mysql
Mysql-server-3.23.54a-11
Mysql-3.23.54a-11
All examples in this article are implemented in Red Hat 9.0. In Red Hat 9.0, you can directly install MySQL through the "software package management" program. The specific method is to first select "SQL database server" on the "add or delete software package" interface, and select "mysql-server-MySQL server and Related Files" in the details ", insert the second disc and select update. You can also install it by running the rpm command directly from the CD. The MySQL server can run normally only after the support of the Perl language is used. Therefore, when using the next installation method, install the Perl language and related software packages before installing MySQL.
After the installation is complete, run the following command to start the MySQL server:
# Service mysqld start
After MySQL is installed, a Super User root is predefined and the password is blank. Any user can use this user locally from the MySQL server to connect to the MySQL database for operations. Obviously this is very insecure, so the root password should be set immediately after MySQL is started. The setting method is as follows:
# Mysqladmin password 'ylgu'
In this way, a new password: ylgui is set.
Is the MySQL server running properly? You can view it by enabling the mysql client program. Use the above password:
# Mysql-u root-pylgui
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 6 to server version: 3.23.54
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Note that there is no space between parameter p and password. The screen displays the databases currently available:
mysql> show databases;+----------+| Database |+----------+| mysql || test |+----------+2 rows in set (0.01 sec)
|
We can see that the MySQL database server has two databases: mysql and test. This indicates that the database server has been correctly installed and started properly.
The following describes how to install, set up, and use the four MySQL GUI solutions.
MySQL Control Center
MySQLCC is a fully functional, GUI-based MySQL client program that can be operated across platforms. It provides a variety of user interfaces that support simplified Chinese and easy to operate. Some operation interfaces are very similar to the "Enterprise Manager", a client tool of the SQL Server database system. Therefore, both in terms of functionality and interface, MySQLCC can be comparable to the GUI-based client programs provided by commercial databases. The development of this project has been very active.
1. Download
You can download the software from http://www.mysql.com/downloads/mysqlcc.html. When writing this article, the newer version of the software is 0.94, and there are two different versions: one for glibc 2.2 and the other for glibc 2.3. You need to check the glibc version number of the local machine before downloading.
# rpm -qa |grep glibcglibc-kernheaders-2.4-8.10glibc-common-2.3.2-11.9glibc-devel-2.3.2-11.9glibc-2.3.2-11.9
|
We can see that glibc 9.0 is installed in Red Hat 2.3. The downloaded software package is named mysqlcc-0.9.4-linux-glibc23.tar.gz.
2. Installation
First, move the file to the/usr/local directory, and then switch to the directory where you want to install the software:
#mv mysqlcc-0.9.4-linux-glibc23.tar.gz /usr/local#cd /usr/local
|
Unbind the software package and create the installation path:
#tar xvzf /usr/local/mysqlcc-0.9.4-linux-glibc23.tar.gz#ln -s mysqlcc-0.9.4-linux-glibc23 mysqlcc
|
The first command tar creates a directory named mysqlcc-0.9.4-linux-glibc23, and the second command ln creates a symbolic link. The purpose of this operation is to make it easier to enter the installation directory every time. You only need to run the command cd/usr/local/mysqlcc to enter the installation directory. Go to the installation directory and run./mysqlcc to start the program, as shown in interface 1.
Figure 1 MySQLCC user interface