Mysql

การติดตั้ง Apache, PHP, MySQL และ phpMyAdmin บน Ubuntu 8.10

การติดตั้ง Apache

1. เปิด Terminal จาก Applications/Utilities/Terminal จากนั้นให้พิมพ์คำสั่งนี้

sudo apt-get install apache2

2. หากใน Terminal เห็นข้อความว่า apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName สามารถแก้ไขได้โดยใช้พิมพ์คำสั่งนี้

gksu gedit /etc/apache2/conf.d/fqdn

เมื่อเปิดเสร็จแล้ว ให้พิมพ์ ServerName localhost ลงไปในไฟล์และบันทึก จากนั้นก็ปิดไฟล์

5
Your rating: None Average: 5 (2 votes)

การเปลี่ยน password ของ root ใน MySQL

เราสามารถตั้งค่า password ของ root ได้ดังนี้

$ mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 146 to server version: 5.0.26-standard
 
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> SET PASSWORD FOR root@localhost=PASSWORD(’newpassword’);
Query OK, 0 rows affected (0.06 sec)
mysql>

0
Your rating: None