Home >Database >Mysql Tutorial >Database: Mysql database server installation and configuration

Database: Mysql database server installation and configuration

黄舟
黄舟Original
2017-02-18 11:28:481410browse

[Introduction] MySQL is a small relational database management system. It was developed by the Swedish company MySQLAB and was acquired by Sun on January 16, 2008. MySQL is widely used in small and medium-sized websites on the Internet. Due to its small size, fast speed and low total cost of ownership, especially the open source code, MySQL is a small relational database management system. The developer is the Swedish MySQLAB company. It was acquired on January 16, 2008. Acquired by Sun Corporation. MySQL is widely used in small and medium-sized websites on the Internet. Due to its small size, fast speed, low total cost of ownership, and especially the characteristics of open source, many small and medium-sized websites choose MySQL as their website database in order to reduce the total cost of website ownership.

It has the following characteristics:

1. Written in C and C++, and tested using a variety of compilers to ensure the portability of the source code

2. Support AIX, FreeBSD, HP-UX, Linux, Mac OS, Novell Netware, OpenBSD, OS/2 Wrap, Solaris, Windows and other operating systems

3. Program for a variety of The language provides an API. These programming languages ​​include C, C++, Eiffel, Java, Perl, PHP, Python, Ruby and Tcl, etc.

4. Support multi-threading, make full use of CPU resources

5. Optimized SQL query algorithm, effectively improve query speed

6. Can be used as a separate application The program is applied in a client-server network environment and can also be embedded into other software as a library to provide multi-language support. Common encodings such as Chinese GB 2312, BIG5, Japanese Shift_JIS, etc. can be used as data table names and data Column name

7. Provide multiple database connection channels such as TCP/IP, ODBC and JDBC

8. Provide management tools for managing, checking and optimizing database operations

9. Can handle large databases with tens of millions of records

1. Mysql installation

First, check whether the Mysql software rpm is installed on your computer -qa | grep mysql

If it is not installed, insert the CD: rpm -ivh mysql-server-*.rpm (if it cannot be installed directly, an error such as libmysqlclients.so.15 is needed will be prompted)

Then, enter the CenOS directory under the CD:

[root@localhost CentOS]# rpm -ivh mysql-server-5.0.45-7.el5.i386.rpm
error: Failed dependencies:
libmysqlclient.so.15 is needed by mysql-server-5.0.45-7.el5.i386
libmysqlclient.so.15(libmysqlclient_15) is needed by mysql-server-5.0.45-7.el5.i386
libmysqlclient_r.so.15 is needed by mysql-server-5.0.45-7.el5.i386
libmysqlclient_r.so.15(libmysqlclient_15) is needed by mysql-server-5.0.45-7.el5.i386
mysql = 5.0.45-7.el5 is needed by mysql-server-5.0.45-7.el5.i386
perl-DBD-MySQL is needed by mysql-server-5.0.45-7.el5.i386
[root@localhost CentOS]# rpm -ivh mysql-5.0.45-7.el5.i386.rpm
Preparing... ########################################### [100%]
1:mysql ########################################### [100%]
[root@localhost CentOS]# rpm -ivh mysql-server-5.0.45-7.el5.i386.rpm
error: Failed dependencies:
perl-DBD-MySQL is needed by mysql-server-5.0.45-7.el5.i386
[root@localhost CentOS]# rpm -ivh perl-DBD-MySQL-3.0007-1.fc6.i386.rpm
Preparing... ########################################### [100%]
1:perl-DBD-MySQL ########################################### [100%]
[root@localhost CentOS]# rpm -ivh mysql-server-5.0.45-7.el5.i386.rpm
Preparing... ########################################### [100%]
1:mysql-server ########################################### [100%]
[root@localhost CentOS]#

Please note:

Resolve the package dependency sequence: Perl-DBD=>mysql =>mysql-server

Or, if your Internet speed is fast, you can reach the sky in one step: yum install mysql-server

2. Start and automatically run the Mysql service

This is a commonplace topic, so I will omit it here. You can refer to the commands of other services.

3. Login

Mysql default user name is "root", the password is empty, first login:

mysqladmin -u root -p original Password New password

This way you can change your password.

IV. Set up phpMyAdmin

1. Download phpMyAdmin-version number.tar.gz

2. Unzip it to /var/www/html , modify the permissions if necessary

3. You can access it in the browser

If the error "Unable to load mysql extension, please check PHP settings" appears, under CenOS, it is missing Caused by php-mysql software, enter the DVD disc:

[root@localhost CentOS]# rpm -ivh php-pdo-5.1.6-20.el5.i386.rpm
Preparing... ########################################### [100%]
1:php-pdo ########################################### [100%]
[root@localhost CentOS]# rpm -ivh php-mysql-5.1.6-20.el5.i386.rpm
Preparing... ########################################### [100%]
1:php-mysql ########################################### [100%]

and it will be done!

The above is the content of database: Mysql database server installation and configuration. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn