centos mysql installation

Transfer **blog.csdn**/jiangfeng08/article/details/5752390

1, to chinaunix download mysql

Download: **download.chinaunix**/download/0008000/7159.shtml

2, upload to CentOS server

In this case on / home/jiangfeng3 in

3, create a mysql group and user

[Root @ localhost ~] # groupadd mysql

[Root @ localhost ~] # useradd-g mysql mysql

4, edit the file permissions

[Root @ localhost ~] # chmod 755 mysql-5.0.75.tar.gz

5, CentOS mysql compile and install


[Root @ localhost ~] # tar zxvf mysql-5.0.75.tar.gz

Access to the mysql installation package

[Root @ localhost ~] # cd mysql-5.0.75

Configuration parameters

[Root @ localhost ~] #. / Configure - prefix = / usr / local / mysql - with-extra-charsets = all - with-unix-socket-path = / usr / local / mysql / var / mysql. sock - with-named-curses-libs = / usr/lib/


[Root @ localhost ~] # make


[Root @ localhost ~] # make install

6, the preparation of CentOS mysql install only the first step, we would also like CentOS mysql prepared accordingly

Under normal circumstances CentOS mysql configuration file to find my.cnf, location in the / etc directory, so we have to file my.cnf file in / etc / directory.

Let CentOS mysql server started to find it. We installed CentOS mysql, the configuration file should be in / usr / local / mysql / share / mysql directory, there are several configuration files, such as my-huge.cnf my-medium.cnf my-large.cnf my-small. cnf, different traffic website and preparation of different server environments, of course, require a different configuration file.

Under normal circumstances, my-medium.cnf this configuration file will be able to meet most of our needs;

Into the / usr / local / mysql this directory,

Look is not already installed it? ?
[Root @ localhost ~] # cd / usr / local / mysql /
[Root @ localhost ~] # ls
bin include info lib libexec man mysql-test share sql-bench

We put / usr / local / mysql / share / mysql this directory my-medium.cnf, copy the my.cnf to the / etc directory.

[Root @ localhost ~] # cp / usr / local / mysql / share / mysql / my-medium.cnf / etc / my.cnf

After doing this work, have to create a CentOS mysql authorization form, or the database is not start. mysql_install_db, use this command is to do this.

CentOS mysql installation commands are installed in / usr / local / mysql / bin this directory.

[Root @ localhost mysql] # / usr / local / mysql / bin / mysql_install_db

After running the mysql_install_db command, we see / usr / local / mysql will find that there is a var directory.

This directory is used to hold the location of all databases, for example, we created a database linuxsir after

In the / / usr / local / mysql / mysql / var directory has linuxsir directory. This time should get the point.

7, start CentOS mysql server, and perhaps this is the easiest, but can not get too excited, because sometimes in the wrong permissions.

CentOS mysql server starts, it should be / usr / local / mysql / share / mysql directory mysql.server

Start method:
[Root @ localhost mysql] # / usr / local / mysql / share / mysql.server start

If you can not start, run / usr / local / mysql / bin / mysqld_safe - user = root will be able to start it! !

Then enter / usr / local / mysql / share / mysql / mysql.server start to a successful start

Well, we set the password to 123456 / usr / local / mysql / bin / mysqladmin-u root password 123456

If you do not return an error description correct.

Then enter / usr / local / mysql / bin / mysql-u root-p can manage CentOS mysql installed.
标签: configuration files, configuration parameters, configuration file, lib, circumstances, tar gz, unix, tar zxvf, bench, file permissions, cnf, article details, unix socket, chinaunix, curses, server environments, charsets, traffic website
分类: Database
时间: 2011-08-04


  1. CentOS Linux installation under MySQL 5.1.x

    MySQL 5.1.x under CentOS Linux installation, optimization and security configuration Download page: http://dev ...
  2. centos mysql and memcached integration under

    A successful installation of the software list mysql-5.1.43-linux-x86_64-icc-glibc23.tar.gz libvent-1.4.7-stab ...
  3. MySQL installation (Linux)

    Often install the latest Linux MySQL, then record the installation process: Operating System: RedHat Enterpris ...
  4. Linux, Java environment JDK + Tomcat + Mysql installation and configuration

    CentOS5.4 install JDK 1, the jdk-6u24-linux-i586.bin files in / opt ordinary users under / opt without written ...
  5. CentOS LAMP installation

    CentOS wide range of sources used. This time we want in terms of how to use the CentOS installation source LAM ...
  6. Java environment under Linux JDK + Tomcat + Mysql installation and configuration

    CentOS5.4 install JDK 1, the jdk-6u24-linux-i586.bin file in / opt under the ordinary user in the / opt withou ...
  7. Uninstalling under Linux and the MySQL installation

    Introduce mysq installation First, the preparation: 1. As redhat Enterprise 5 comes with a version of mysql, i ...
  8. MySQL installation is there could not start the service mysql error: 0

    mysql-5.0.18-win32 encountered a problem, such as the title. Today, costs a great deal of enthusiasm, still no ...
  9. The mysql installation linux

    Three mysql installation: RPM binary package and source code The installation of the system platform for the r ...
  10. MYSQL installation there could not start the service mysql error: 0 treatment

    When you install, reinstall when you could not start the service mysql error: 0 error, you can try the followi ...
  11. fedora8 mysql installation under

    Remember fedora7 document in accordance with the mysql installation step by step to the line, but in fedora 8 ...
  12. MySQL installation apply security setting error occurs when the solution

    Install mysql database, if re-install, easy to meet apply security setting error, ie configure mysql start ser ...
  13. linux + apache + php + mysql installation and configuration documentation

    First, install mysql (Mysql-5.0.21.tar.gz) cp Mysql-5.0.21.tar.gz / home cd / home tar zxf Mysql-5.0.21.tar.gz ...
  14. mysql installation under linux

    Has been uninstalled before installation to confirm the default mysql, while paying attention to the version o ...
  15. Mysql installation version and install the free version of the switch to use

    If you agree with the system simultaneously install mysql and no-install mysql, then how to carry two versions ...
  16. linux mysql installation process under

    Linux recently installed mysql, according to information collected online and personal operation, probably mad ...
  17. IIS + PHP + MYSQL installation configuration (change)

    First, download the, and phpMyAdmin- ...
  18. Linux, MySQL installation and configuration, MySQL configuration arguments detailed

    First, download the compiled installation # Cd / usr / local / src / # Wget ...
  19. Under LINUX MYSQL Installation Guide (zz)

    Install Mysql 1, download MySQL's installation files need to view the LINUX version [Root @ server database] # ...