mysql5.5 compiling the installation process (self-summary)

Source: Internet
Author: User
Tags chmod

one, the installation process//Create a MySQL installation directory, create a data store directory, create users and user groups, and assign permissions to the data store directorymkdir-p/usr/local/mysql/mkdir-p/data/mysql/Groupadd Mysqluseradd-g MySQL MySQLChownMysql:mysql-r/data/mysql///Install CMake (mysql5.5 is compiled by CMake later)wgethttp//www.cmake.org/files/v2.8/cmake-2.8.4.tar.gzTarZXVF cmake-2.8.4.Tar. GZCD CMake-2.8.4./Configuregmake (or make) Make Install//install MySQLwget FTP://mirror.switch.ch/mirror/mysql/downloads/mysql-5.5/mysql-5.5.38.tar.gzDownload mysql-5.5. -.Tar. GZ (downloaded under local H:\linux Software installation package \)TarZXVF mysql-5.5. -.Tar. GZCD MySQL-5.5. -compiling with CMake: CMake-dcmake_install_prefix=/usr/local/MySQL-dmysql_unix_addr=/data/mysql/Mysql.sock-ddefault_charset=UTF8-ddefault_collation=Utf8_general_ci-dwith_extra_charsets:string=UTF8,GBK-dwith_myisam_storage_engine=1 -dwith_innobase_storage_engine=1 -dwith_memory_storage_engine=1 -dwith_readline=1 -denabled_local_infile=1 -dmysql_datadir=/data/MySQL-dmysql_user=MySQL-dmysql_tcp_port=3306  Make Make Install//If no error occurs, the installation is completeThe following error occurred installing MySQL--Could notFindCurses (missing:curses_library curses_include_path) CMake Error at CMake/readline.cmake: the(MESSAGE): Curses library not found. pleaseInstallappropriate package, remove CMakeCache.txt and rerun CMake. On Debian/ubuntu, package name was Libncurses5-dev, on Redhat and derivates it's ncurses-devel. Call Stack (most recent call first): CMake/readline.cmake:118(find_curses) CMake/readline.cmake:214(mysql_use_bundled_readline) CMakeLists.txt:361(Mysql_check_readline)--Configuring incomplete, Errors occurred!Workaround:RM-F CMakeCache.txtYum-YInstallncurses-deve Second, MySQL installation and testing;//Copying a configuration fileCPsupport-files/my-medium.cnf/etc/my.cnf//initializing the database (required, very important)chmod 755scripts/mysql_install_dbscripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/data/mysql///setting up the mysqld bootCPsupport-files/mysql.server/etc/init.d/MySQLchmod 755/etc/init.d/mysqlchkconfig MySQL on//Configure the environment (for convenience, add MySQL Bin directory to path, add Mysql/bin to/etc/profile, add two aliases to facilitate operation)Export path=/usr/local/mysql/Bin: $PATH//Switch ClientAlias mysql_start="mysqld_safe&"alias Mysql_stop="mysqladmin-uroot-p shutdown"//start the MySQL service/etc/init.d/MySQL start//See if it startsPS-ef |grepmysqld Set the password for the root account mysqladmin-U root Password'YourPassword'Delete the empty password account for the native anonymous connection use mysql;update user set password='Root'where user ='127.0.0.1';//set a password for your local accountDelete from user where password="";//Remove blank passwordFlush privileges;//Make settings effectivethird, the realization of MySQL remote connection of the actual operation process Mysql–u root–puse MySQL;Selectuser,password,host from user; Update user set host='192.168.%'where user ='127.0.0.1';//set up local users to log on at any terminalGRANT all privileges on * * to'Root'@'%'Identified by'Root Password'With GRANT OPTION;//permission to log on to rootFLUSH privileges;//Make settings effective

mysql5.5 compiling the installation process (self-summary)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.