MySQL's "bug" about timestamp and mysqldump
BitsCN.com
MySQL's "bug" about timestamp and mysqldump"
Recurrence
The problem that a colleague encountered when performing a data dump is simplified as follows:
1. create a table
Drop table if exists tb;
Create table tb (
C timestamp not null default '2017-00-00 00:00:00'
) ENGINE = InnoDB default charset = gbk;
Insert into tb values (now ());
Select * from tb;
Return
Mysql> select * from tb;
+ --------
official website for installation. Http://dev.mysql.com/downloads/mysql/) 1. install the tools and libraries required to compile the source code yum install gcc-c ++ ncurses-devel perl install cmake (after mysql5.5 are installed with cmake)
Wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
Tar-xzvf cmake-2.8.10.2.tar.gz
Cd cmake-2.8.10.2
./Bootstrap; make install
2. create a mysql user and group g
the MySQL service process:Service mysqld stop(3) Move the entire/var/lib/mysql directory to/qudeedata/dbdata/mysql5.1.16Mv/var/lib/mysql/qudeedata/dbdata/mysql5.1.16In this way, the MySQL data file is moved to/qudeedata/dbdata/mysql5.1.16.(4) edit the MySQL configuration fi
database to greatly improve the performance. For the server system, CentOS6.7 X86_64 is recommended. The compilation parameters of the source code package generate binary code in Debug mode by default, while the Debug mode causes a high performance loss for MySQL, therefore, when compiling the product code to be installed, do not forget to use the-without-debug parameter to disable the Debug mode. If you set the compilation parameters-with-mysqld-ldf
Tags: mysql error can ' t connect to local MySQL server through socket '/VAR/LIB/MYSQL/MYSQ 1, Create/modify file/etc/my.cnf, add/modify at least one line [MySQL]
[Client]
Socket =/tmp/mysql.sock#在这里写上你的mysql. Sock the correc
When MySQL creates multiple instances, it actually points the data file, sock, and port to different files and ports.
MySQL installation process see http://blog.csdn.net/tangpengtao/article/details/6650424
Create a 3307 data directory first
[Root @ localhost mysql-5.5.15] # mkdir-P/usr/local/mysql3307[Root @ localhost
MySQL 5.6.x multi-instance ConfigurationPrerequisites
For testing, the installation is in binary mode, which is simple, convenient, and fast.MySQL-5.6.x binary version installation record
I do not like to configure multiple instances in mysqlmulti mode or multi-process mode.1. Prepare the datadir directory of the database instance.
# Mkdir-p/usr/local/mysql/mysql3307# Chown
Install two or more mysql implementation steps on one server and one mysql
How can I install two or more mysql instances on one server? The following are detailed steps for learning.
I. Environment
Mysql software package:
Mysql-5.6.31.tar
MySql-centos installation configuration (reprinted) CentOS
This article from: http://www.bitsCN.com/database/201305/208114.html
Thanks for the author. if there is any programs with copyright please leave message in my blog,
I will deall with immediately.
Install mysql using yum in centOS Linux
Article 1: install and configure MySQL
Step 1: install
MySQL service cannot be started-troubleshooting, mysql startup
Symptoms: the following ERROR occurs when you log on to MySQL after deleting a few unused databases in MySQL the previous day: mysql-u root-ppasswd ERROR 2002 (HY000 ): can't connect to local
Install the mysql source code package (applicable to multiple mysql) and mysql source code1. install the required package for compiling the code: yum list | grep ncurses-develyum-y install make gcc-c ++ cmake bison-devel ncurses-devel 2. download MySQL 5.6.35wget https://cdn.mysql.com//Downloads/
access the table. After the table is initialized, set the access permissions for mysql and root users.6. # chown-R mysql data // sets the mysql user to access/usr/local/mysql/data, which stores mysql database files. this directory is in/etc/my. configuration in cnf, generat
the location where the mysql. sock file is generated. Modify the right value of a socket =/var/lib/mysql. sock Line with the medium number:/Qudeedata/dbdata/mysql5.1.16/mysql. sock. The procedure is as follows:Command: vi my. cnf
registered trademark of Oracle Corporation and/or itsaffiliates. Other names trademarks of their respectiveowners. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.mysql> exitbye[[emailprotected] ~]# mysql-uroot-p-s/tmp/mysql.s Ock//Use sock login, only for local connection, equivalent to "mysql-uroot-p123456" Enter password
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.