In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces how to solve the problem of installing mysql 5.5 garbled code in linux, the content is very detailed, interested friends can use it for reference, hope to be helpful to you.
Ruby code
1. Open the my.cnf file and add the following parameters:
[client]: add default-character-set=utf8 parameter
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. Restart the mysql service after the configuration is completed.
Service mysql restart
3. After connecting to yours, enter the command: SHOW VARIABLES LIKE'% char%'; to view the character set used in your database:
When installing for the first time, the default password is empty, and you can change the root password using the following command
Admin-u root password mypassword
The new password set for you by mypassword
Www.2cto.com
Introduction to the mysql directory:
The default installation directory under the description
/ var/lib/mysql data file directory
/ usr/share/mysql configuration file directory
/ usr/bin program directory
/ etc/rc.d/init.d/mysql startup script
Start | terminate | 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
Modify the socket=/data/mysql/mysql.sock of client and mysqld groups
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 table name > xxx.sql
Export structure does not export data mysqldump-- opt-d database name-u root-p > xxx.sql
Www.2cto.com
Configure JAVA environment variables
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
How to solve the problem of installing mysql 5.5 garbled code in linux is shared here. I hope the above content can be helpful to everyone and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.