Mysql fully installed use guide

xiaoxiao2021-03-18  201

Install mysql # tar zxvf mysql-4.0.14.tar.gz -c / setup # cd/setup/mysql-4.0.14 # groupadd mysql # useradd mysql -g mysql -m -s / bin / false # ./configure - -prefix = / web / mysql / specified installation directory --without-debug / removal Debug mode --with-extra-chars = GB2312 / Add GB2312 Chinese Character Support - assembly version of some character functions - WITHOUT-ISAM / Remove ISAM Table Type Support Now I rarely use the ISAM table is a table that relies on the platform --without-InnoDB / Removal INNODB table supports INNODB is a table that supports transaction processing, suitable for enterprise applications --with -pthread / Force use PTHREAD library (POSIX thread library) --Nable-thread-save-client / compiled client -with-client-ldflags = -All-static / --with-mysqld-ldflags = All-static / compiles the server and client --with-raid / activation RAID support

./configure --prefix = / usr / local / mysql --without-debug --with-extra-charsets = GB2312 --Nable-assembler --without-isam --without-innodeb --with-pthread --enable -Thread-Safe-Client --with-Client-ldflags = -all-static --with-mysqld-ldflags = -All-static --with-raid

# Make # make install # scripts / mysql_install_db / Generate mysql User Database and Table File # CP Support-Files / My-Medium.cnf /etc/my.cnf / Copy Profile, with Large, Medium, Small three environments Depending on the machine performance selection, if the load is relatively large, you can modify the memory usage value of some variables inside # cp support-files / mysql.server /etc/init.d/mysqld / copy MySQLD file # chmod 700 / etc / Init.d / mysqld # cd / web # chmod 750 mysql -r # chgrp mysql mysql -r # chown mysql mysql / var -r # cd / web / mysql / libexec # cp mysqld mysqld.old # Strip mysqld # chkconfig - Add MySQLD # chkconfig --LVICESQLD Start # netstat -atln Take a look at the port of 3306 open, if mysqld can't start, see the error log under / web / mysql / var, generally direct directory permissions No problem # ln -s / web / mysql / bin / mysql / sbin / mysql # ln -s / web / mysql / bin / mysqladmin / sbin / mysqladmin # mysqladmin -uroot password "youpassword") set the root account Password # mysql -uroot -p # Enter the password mysql>; use mysql; mysql>; delete from user where password = ""; "Delete an empty password account for this anonymous connection Mysql>; flush privileges; mysql >; quit ● Install DBI and DBD for mysql to provide Perl access to the interface specification of the MySQL database, please confirm that you have installed Perl, the default system is installed.

# cd / setup # tar zxvf dbd-mysql-2.9002.tar.gz -c / setup # tar zxvf dbi-1.38.tar.gz -c / setup # cd dbi-1.38 # perl makefile.pl # make # make test # Make Install Because the path in the Perl program is / usr / local / bin / perl, the Red Hat System is / usr / bin / perl by default, so it is best to make a connection to ensure compatibility # ln -s / usr / bin / perl / usr / local / bin / perl # cd ../dbd-mysql-2.9002 Generate installation configuration files need to add some parameters after Perl makefile.pl, trouble, we can add one to / web / mysql / bin / mysql_config connection Solution to the problem system automatically looks for this command to generate the installation of the database parameter # ln -s / web / mysql / bin / mysql_config / sbin / mysql_config # perl makefile.pl # make # make instill Here Make Test I always run half an error, but after installation, I can run the test script in my mysql directory. I don't know how 3.x's mysql now you can run the test script, but the speed is slow, hanging in the background. # Perl / web / mysql / sql-bench / run-all-tests --user = root --password = "youpassword"

Attachment: ● Mysql commonly useful options and command mysqld ----- Enable log support --Log --Log-update --Log-long-formart ● mysql grant all on database. * To user identified by "Password "New User user, given all permissions of the Database database REVOKE All on Database from User Remove all permissions on the Database database MySQL -UROOT -P --ONE-DATABASE DATABASENAME

Where is RPM-QL MySQL?

转载请注明原文地址:https://www.9cbs.com/read-129968.html

New Post(0)