mysql Ô¶³Ì ip·ÃÎÊ
ĬÈÏÇé¿öÏÂLinuxÄÚµÄmysqlÊý¾Ý¿âmysql£¬user±íÄÚµÄÓû§È¨ÏÞÖ»ÊǶÔlocalhost¼´±¾»ú²ÅÄܵǽ¡£ÐèÒª¸ü¸ÄȨÏÞ£º
Èçϵķ½Ê½È·ÈÏ£º
root#mysql -h localhost-u mysql -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4 to server version: 4.0.20a-debug
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql; (´ËDB´æ·ÅMySQLµÄ¸÷ÖÖÅäÖÃÐÅÏ¢)
Database changed
mysql> select host,user from user; (²é¿´Óû§µÄȨÏÞÇé¿ö)
+-------------+-------+
| host | user |
+-------------+-------+
| localhost | |
| localhost | root |
| localhost | |
| localhost | mysql |
+-------------+-------+
6 rows in set (0.02 sec)
ÓÉ´Ë¿ÉÒÔ¿´³ö£¬Ö»ÄÜÒÔlocalhostµÄÖ÷»ú·½Ê½·ÃÎÊ¡£
½â¾ö·½·¨£º
mysql> Grant all privileges on *.* to 'root'@'%' identified by ‘password’with grant option;
(%±íʾÊÇËùÓеÄÍⲿ»úÆ÷£¬Èç¹ûÖ¸¶¨Ä³Ò»Ì¨»ú£¬¾Í½«%¸ÄΪÏàÓ¦µÄ»úÆ÷Ãû£»‘root’ÔòÊÇָҪʹÓõÄÓû§Ãû£¬)
mysql> flush privileges; (ÔËÐÐΪ¾ä²ÅÉúЧ£¬»òÕßÖØÆôMySQL)
Query OK, 0 rows affected (0.03 sec)
mysql> select host,user from user; (Ôٴβ鿴Óû§µÄȨÏÞÇé¿ö)
+-------------+-------+
| host | user |
+-------------+-------+
| £¥ | mysql |
| £¥ | root |
| localhost
Ïà¹ØÎĵµ£º
×÷Õߣº°½Ê¿Î°
Mysql ÓõÄÊÇLinux (non RPM packages)
Ò»¡¢½«mysql-5.5.0-m2-linux-i686-glibc23.tar.gzÏÂÔØµ½/home/ikmb ²¢ÔÚµ±Ç°Ä¿Â¼½âѹ£»
……..
mysql-5.5.0-m2-linux-i686-glibc23/data/mysql/
mysql-5.5.0-m2-linux-i686-glibc23/data/test/
…………
& ......
1. mysqldump -u username -h somehost -p --compatible=mysql40 db_name > temp.sql
2. ÓÃphpmyadminÇå¿ÕÊý¾Ý¿â²¢ÉèÖÃÊý¾Ý¿âÕûÀíΪutf8_general_ci
3. mysql -u username -h somehost -p --default-character-set=utf8 db_name < temp.sql ......
¼òÒ׽ű¾
·½±ã±¸·ÝMySQL
Êý¾Ý¿â
@echo off
echo.
echo MySQLÊý¾Ý¿â±¸·Ý
echo *****************************
echo.
echo ½ñÌìÊÇ %date%
echo ʱ¼äÊÇ %time%
echo.
echo *****************************
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
md "E:\%Ymd% ......
The security settings could not be applied to the database because the connection has failed with the following error.
Error Nr. 2003
Can't connect to MySQL server on 'localhost' (10061)
If a personal firewall is running on your machine, please make sure you have opened the TCP port 3306 for conn ......
mysql> flush privileges;ʲôÒâ˼£¿
mysql> update mysql.user set password=PASSWORD('ÐÂÃÜÂë') where User='root';
mysql> flush privileges;
mysql> quit
´ð:
mysql ÐÂÉèÖÃÓû§»ò¸ü¸ÄÃÜÂëºóÐèÓÃflush privilegesË¢ÐÂMySQLµÄϵͳȨÏÞÏà¹Ø±í£¬·ñÔò»á³öÏ־ܾø·ÃÎÊ£¬»¹ÓÐÒ»ÖÖ·½· ......