RedhatÏ Apache, php, mysqlµÄĬÈÏ°²×°Â·¾¶
apache:
Èç¹û²ÉÓÃRPM°ü°²×°£¬°²×°Â·¾¶Ó¦ÔÚ /etc/httpdĿ¼ÏÂ
apacheÅäÖÃÎļþ:/etc/httpd/conf/httpd.conf
ApacheÄ£¿é·¾¶£º/usr/sbin/apachectl
webĿ¼:/var/www/html
Èç¹û²ÉÓÃÔ´´úÂë°²×°£¬Ò»°ãĬÈÏ°²×°ÔÚ/usr/local/apache2Ŀ¼ÏÂ
php:
Èç¹û²ÉÓÃRPM°ü°²×°£¬°²×°Â·¾¶Ó¦ÔÚ /etc/Ŀ¼ÏÂ
phpµÄÅäÖÃÎļþ:/etc/php.ini
Èç¹û²ÉÓÃÔ´´úÂë°²×°£¬Ò»°ãĬÈÏ°²×°ÔÚ/usr/local/libĿ¼ÏÂ
phpÅäÖÃÎļþ: /usr/local/lib/php.ini
»ò/usr/local/php/etc/php.ini
mysql:
Èç¹û²ÉÓÃRPM°ü°²×°£¬°²×°Â·¾¶Ó¦ÔÚ/usr/share/mysqlĿ¼ÏÂ
mysqldumpÎļþλÖãº/usr/bin/mysqldump
mysqliÅäÖÃÎļþ:
/etc/my.cnf»ò/usr/share/mysql/my.cnf
mysqlÊý¾ÝĿ¼ÔÚ/var/lib/mysqlĿ¼ÏÂ
Èç¹û²ÉÓÃÔ´´úÂë°²×°£¬Ò»°ãĬÈÏ°²×°ÔÚ/usr/local/mysqlĿ¼ÏÂ
Ïà¹ØÎĵµ£º
phpÁ¬½Ómysql²âÊÔ´úÂ룺
$link=mysql_connect('localhost','root','123456');
if(!$link) echo "ʧ°Ü!";
else echo "³É¹¦!";
mysql_close();
?>
ÔËÐдúÂë³öÏÖ£ºCall to undefined function 'mysql_connect()'… ʧ°Ü
°Ù¶ÈÕÒµ½½á¹ûÊÇPHP+MYSQL »·¾³Ã ......
1¡¢eregÀïÃæÊDz»ÐèÒªÒ²²»ÄÜʹÓ÷ָô·ûºÍÐÞÊηûµÄ£¬ËùÒÔeregµÄ¹¦ÄܱÈpregÒªÈõÉϲ»ÉÙ¡£
¡¡¡¡2¡¢¹ØÓÚ"."£ºµãÔÚÕýÔòÀïÃæÒ»°ãÊdzýÁË»»ÐзûÒÔÍâµÄÈ«²¿×Ö·û£¬µ«ÊÇÔÚeregÀïÃæµÄ"."ÊÇÈÎÒâ×Ö·û£¬¼´°üÀ¨»»Ðзû£¡Èç¹ûÔÚpregÀïÃæÏ£Íû"."
Äܹ»°üÀ¨»»Ðзû£¬¿ÉÒÔÔÚÐÞÊηûÖÐ ......
1.²éÕÒµ±
mysql> show binary logs;
+—————-+———–+
| Log_name | File_size |
+—————-+———–+
| mysql-bin.000001 | 150462942 |
| mysql-bin.000002 | 125 |
| mysql-bin.000003 | 106 |
+&mdash ......
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@localhost]# mysql -u root -p
Enter password:
ERROR 2002 (H ......
mysql> SOURCE [·¾¶]ÎļþÃû
ÓÐÁ½ÖÖд·¨£º
1¡¢
mysql> SOURCE cr_pet_tbl.sql
Õâ¸öʱºò£¬cr_pet_tbl.sql±ØÐë·ÅÔÚÄãµÄmysql/binĿ¼ÏÂÃ棬¼´¸úmysql.exeͬһĿ¼
2¡£
mysql> SOURCE c:\cr_pet_tbl.sql
Õâ¸öʱºòλÖÃλÖÃÕýÈ·¼´¿É£¬ ......