Home  >  Article  >  Database  >  Ubuntu下的xampp装配及mysql终端登录

Ubuntu下的xampp装配及mysql终端登录

WBOY
WBOYOriginal
2016-06-07 16:25:261140browse

Ubuntu下的xampp安装及mysql终端登录 我去!用了整整一天弄完。。。。各方资料这个查

Ubuntu下的xampp安装及mysql终端登录

我去!用了整整一天弄完。。。。各方资料这个查啊。。。赶紧记下来吧。。

下载软件 xampp:   http://pan.baidu.com/s/1kTHmtl9

将下载的压缩文件释放到 /opt:
tar xvfz xampp-linux-1.7.1.tar.gz -C /opt

这时候XAMPP 被安装在 /opt/lampp 目录下

然后运行:  /opt/lampp/lampp start


您应该能在屏幕上看到类似下面的提示信息:
Starting XAMPP 1.7.1...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.

在浏览器中输入:http://localhost

就可以看到:


可是这时候还不能用命令行登录mysql

否则会出现:


下面需要这样做:

sudo apt-get install mysql-Server-core-5.5  
sudo /opt/lampp/lampp startmysql  
sudo mkdir /var/run/mysqld
sudo ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock
mysql -u root -p

这时候不需要输入密码。直接回车就可以!



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn