Configuration Installation of MySQL under Linux RMP-IVH mysql-server-4.1.22-0.glibc23.i386.rpm--NODEPSRMP-IVH mysql-client-4.1.22-0.glibc23.i386.rpm--nodeps See if the installation succeeds NETSTAT-ATLN command see 3306 Port Open instructions install successfully login MySQL [-u username] [-h host ] [-p[password]] [dbname] Initial no password, this MySQL executable file in/usr/bin/mysql directory 1, database directory /VAR/LIB/MYSQL/2, configuration file/usr/share/ MySQL (mysql.server command and configuration file) 3, related commands/usr/bin (mysqladmin mysqldump and other commands) 4, startup script/etc/rc.d/init.d/ (Startup script file mysql directory) modify login password mysql default no password usr/bin/mysqladmin-u root password ' new-password ' format: Mysqladmin-u user name---old password password New password start and stop MySQL installation is complete after you start the file MySQL in the/ETC/INIT.D directory, run the following command when it needs to start:/etc/init.d/mysql start stop:/usr/bin/mysqladmin-u root -P shutdown reboot: sudo/etc/init.d/mysql restart auto start: see if MySQL is/sbin/chkconfig in the Autostart list-- List add MySQL to your system's startup service group to/sbin/chkconfig--add MySQL to remove MySQL from the boot service group/sbin/chkconfig--del MySQL configuration will/usr/share/mysql /MY-MEDIUM.CNF Copy to/etc/my.cnf, modify the My.cnf file later to modify the global settings for MySQL to set the innodb_flush_log_at_trx_commit in my.cnf file to optimize for [ MYSQLD] Add add lower_case_table_names set toCase-insensitive table name Set character Set the default encoding for MySQL is Latin1, which does not support Chinese, to support the need to modify the default encoding of the database to GBK or UTF8. 1, abort the MySQL service (bin/mysqladmin-u root shutdown) 2, found under/etc/my.cnf, if not the MySQL installation directory under the Support-files directory my-medium.cnf copy to /etc/and renamed to MY.CNF can 3, open my.cnf, after the [client] and [mysqld] add Default-character-set=utf8, save and close 4, start the MySQL service (bin/ Mysqld_safe &) query character set: Show variables like '%set% '; add MySQL user format: Grant select on database. * To User name @ login host identified by "password" grant Select,insert,update,delete on * * to [email protected] '% ' identified by ' 123 '; grant all on *. * to [Email protec Ted] ' localhost ' identified by ' 123 '; remote access one: GRANT all privileges on * * to [email protected] '% ' identified by ' 654 321 '; Allows xoops_root users to log in to MySQL from any machine. Second: Edit/etc/mysql/my.cnf >skip-networking = # skip-networking So you can allow other machines to access MySQL. grant All on * * to ' root ' @ ' IP ' identified by ' password '; backup and restore backup into the library directory, cd/val/lib/ Mysqlmysqldump-u root-p--opt AAA > BACK_AAA Recovery mysql-u root-p CCC < BACK_AAA
MySQL installation and configuration under Linux