Ubuntu 14.04版本装mysql装不上, 可能是没有装 mysql-common, 后来加上mysql-common-5.6后完成安装
sudo rm /var/lib/mysql/ -R
sudo rm /etc/mysql/ -R
sudo apt-get autoremove mysql* --purge
sudo apt-get remove apparmor
sudo apt-get install mysql-server mysql-common
另外一个版本
$ sudo apt-get --yes autoremove --purge mysql-server-5.5 $ sudo apt-get --yes autoremove --purge mysql-client-5.5 $ sudo apt-get --yes autoremove --purge mysql-common $ sudo rm -rf /var/lib/mysql /etc/mysql ~/.mysql $ sudo deluser mysql $ sudo apt-get autoclean $ sudo apt-get update && sudo apt-get upgrade $ sudo apt-get install mysql-server-5.5 mysql-client-5.5
NOTE: when you get 'dpkg: error...' please run step below:
$ sudo dpkg --configure -a
在 Ubuntu 中通过 mysql 命令行创建好一个数据表并分配了权限:
GRANT ALL ON testdb.* TO usera IDENTIFIED BY 'passwd'
然后重启加载权限:
mysql> flush privileges
之后在其他机器上远程访问该Mysql服务 mysql -h192.168.4.217 -utest -ptest
2003 – Can't connect to MySQL server on 'ubuntu'(10061)
查看 mysql.user 表,usera 的确已经有了任意主机访问的权限。
于是想到是不是 MySQL Server 绑定了本地地址,打开 /etc/mysql/my.cnf,找到:
bind-address = 127.0.0.1
去除 IP 地址绑定,把它改为:
bind-address = 0.0.0.0
然后重启 MySQL Server:
/etc/init.d/mysql restart
安装JDK
首先安装工具包
apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer
安装tomcat7
libtomcat7-java
tomcat7-common
tomcat7