Ubuntu安装MySQL和phpmyadmin

安装MySQLsudo apt-get update

sudo apt-get upgrade

sudo apt-get install mysql-server-5.6

安装phpmyadminsudo apt-get install phpmyadmin

php5enmod mcrypt

service apache2 restart

注意:安装phpmyadmin时,会有一步需要配置apache2,要按space选中,然后按tab将光标移动到OK的位置

phpmyadmin的安全设置vi /etc/apache2/conf-available/phpmyadmin.con......

在MySQL中建表

CREATE TABLE `fbstatus`

(

`status_id` INT NOT NULL AUTO_INCREMENT,

`s_text` TEXT,

`t_status` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,

PRIMARY KEY ( `status_id` )

);

mysql> desc status.fbstatus;

+-----------+-----------+------+-----+-------------------+----------------+

| Field | Type | Nul......