標籤:新裝的mysql,訪問mysql資料庫是遇到問題:ERROR 1044 (42000): Access denied for user ‘‘@‘localhost‘to database ‘mysql‘,[[email protected] mysql-5.1.61]# mysql -u root -pEnter password:Welcome to the MySQL monitor. Commands end with ; or
標籤:mysql原mysql的版本是:3.4.10.1deb1,目標mysql的版本是:5.0.51b-community-nt-log,匯入資料時出現了一下問題:1、DELIMITERYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘DELIMITER //‘ at line
標籤:如果你想串連你的mysql的時候發生這個錯誤: ERROR 1130: Host ‘192.168.1.81‘ is not allowed to connect to this MySQL server解決方案:1. 改表法。可能是你的帳號不允許從遠程登陸,只能在localhost。這個時候只要在localhost的那台電腦,登入mysql後,更改 "mysql" 資料庫裡的 "user" 表裡的 "host" 項,從"localhost"改稱"%"
標籤:網上看了一些總結出來的資料,不知道對大家有沒有用的,有用的話也就不枉費我一按按鈕的一片苦心了。/usr/local/mysql/bin/mysql -uroot -proot test -e "LOAD DATA INFILE ‘/usr/1.txt‘ replace INTO TABLE test FIELDS TERMINATED BY ‘\t‘ (name,address)" info: 1.txt zhangsan wuhan lishi
標籤:mysql 走錯索引導致驅動表選錯原sql:select count(*) from mpay_order mpayOrder inner join mrecharge_order_info orderinfo on mpayOrder.order_num = orderinfo.order_num inner join mpay_trade mpayTrade on mpayOrder.order_num = mpayTrade.order_num where TRUE and
標籤:假如表中包含一列為auto_increment,如果是Myisam類型的引擎,那麼在刪除了最新一筆資料,無論是否重啟Mysql,下一次插入之後仍然會使用上次刪除的最大ID+1.mysql> create table test_myisam (id int not null auto_increment primary key, name char(5)) engine=myisam;Query OK, 0 rows affected (0.04 sec)mysql>
標籤: 1、查詢去重資料select *, count(distinct name) from table group by name2.避免重複資料如果是用主鍵primary或者唯一索引unique區分了記錄的唯一性,避免重複插入記錄可以使用:insert ignore into table_name(email,phone,user_id) values(‘[email protected]‘,‘99999‘,‘9999‘),這樣當有重複記錄就會忽略,