標籤:mysql 匯入 文字檔 問題:資料庫編碼為gb2312,Excel表格另存新檔Unicode文字檔。執行命令 load data local infile "f:/aa.txt" into table "tb_test"; 匯入的中文內容為亂碼。解決辦法:Excel表格加存為csv檔案(以","分隔)。執行命令 load data local infile "f:/aa.csv"
標籤:mysql> grant all on performance_schema.* to ‘testuser‘@‘%‘;ERROR 1044 (42000): Access denied for user ‘root‘@‘localhost‘ to database ‘performance_schema‘mysql> grant all on information_schema.* to ‘testuser‘@‘%‘;ERROR 1044 (42000): Access
標籤:#! /bin/bash# v.mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz# only install master mysql# time:2016-08-15# pkg dirpkg_dir=`pwd`# mysql base dirdata_dir="/data/mysql_root/mysql"base_dir="/usr/local/mysql"# create MySQL group and userecho "start create
標籤:最近兩天做需求,是要將退款和退貨報表裡使用的暫存資料表改用固定表,自己建表時,如(只是舉例):CREATE TABLE tasks ( task_id INT UNSIGNED NOT NULL AUTO_INCREMENT, parent_id INT UNSIGNED NOT NULL DEFAULT 0, task VARCHAR(100) NOT NULL, test_id INT UNSIGNED NOT NULL DEFAULT 0, date_added TIMESTAMP
標籤: RESET SLAVE的文法如下:RESET SLAVE [ALL] [channel_option]channel_option: FOR CHANNEL channel 其中,channel_option主要是針對5.7.6引入的多源複製。 RESET SLAVE官方的解釋如下RESET SLAVE makes the slave forget its replication position in the master‘s binary
標籤:前段時間出差在現場開發的時候,匯入資料庫老是出問題。最後發現了一個神奇sql語句交給實施,只要匯入出錯就把如下語句執行就可以了。至今屢試不爽。1234567set global max_allowed_packet=100 000 000; set global net_buffer_length=100000; SET GLOBAL interactive_timeout=28800 000; SET GLOBAL
標籤:centos中安裝mysql很簡單如下命令即可yum install mysql 裝好了,運行mysql ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)。有文章說是許可權問題,後來把許可權搞成777也不行。說是沒啟動MYSQL。那就啟動吧[[email protected] mysql]# service mysql
標籤: 進入mysql目錄輸入命令列# less localhost.localdomain.err160703 20:00:12 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql2016-07-03T12:00:12.397109Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use