Installing mysql 5.5 in linux

Source: Internet
Author: User
Tags mysql export database


Ruby Code 1. open my. add the following parameter to the cnf file: [client]: Add default-character-set = utf8. The following is a code snippet: [client] www.2cto.com # password = [your_password] port = 3306 socket =/tmp/mysql. sock default-character-set = utf8 [mysqld] default-storage-engine = INNODB character-set-server = utf8 collation-server = utf8_general_ci # generic configuration options port = 3306 socket =/ tmp/mysql. sock 2. After the settings are complete, restart mysql service mysql restart 3. After connecting to your database, enter the command: show variables like '% char % '; now you can see the character set used by your database: the default password is blank during the first installation. You can use the following command to change the root password, mysqladmin-u root password mypassword the new password www.2cto.com mysql directory you set is described as follows: description: The default installation directory/var/lib/mysql data file directory/usr/share/mysql configuration file directory/usr/bin program directory/etc/rc. d/init. d/mysql STARTUP script | stop | view the server/etc/rc. d/init. d/mysql start | stop | status/usr/bin/mysqladmin-u root-ppassword shutdown
Change the data file directory mv/var/lib/mysql/data/cp/usr/share/mysql/my-medium.cnf/etc/my. cnf vi/etc/my. cnf modifies the socket =/data/mysql for the client and mysqld groups. sock vi/etc/rc. d/init. d/mysql modify datadir =/data/mysql export database and data mysqldump-u root-p dbname> 20101216_test. SQL export data do not export structure mysqldump-t database name-uroot-p> xxx. SQL export the structure of a specific table mysqldump-u root-p-B database name -- table Name> xxx. SQL export structure does not export data mysqldump -- opt-d database name-u root-p> xxx. configure JAVA environment variable JAVA_HOME =/usr/java/jdk1.7.0 _ 03 PATH = $ JAVA_HOME/bin: $ path classpath =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar export JAVA_HOME export PATH export CLASSPATH author dream_ait

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.