当我使用c9.io时,如何连接到MySQL [英] When I use c9.io ,How can I connect to MySQL

查看:118
本文介绍了当我使用c9.io时,如何连接到MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

c9.io是一个非常好的网站

c9.io is a verygood website

我有一个php zoon,当我想连接到MySQL时,我不知道密码. 我尝试[空格]根... 但是,一切都错了.

I have a php zoon , and when I want to connect to MySQL,I don't know password. I have try [space] root ... but,all is wrong.

我可以在shell中打开mysql,没有密码,我的操作返回错误: 错误:无法通过套接字'/var/lib/mysql/mysql.sock'(2)连接到本地MySQL服务器"

I can open mysql in shell , no password ,my operate return error: error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'

看起来好像mysqld没有启动.(我尝试过"mysqld start",但是失败了)

It's looks like, mysqld is not started 。(I have try "mysqld start",but faild)

我想知道的是, Mysql服务在c9.io上免费吗?

What I want to know, Is Mysql service free on c9.io ?

推荐答案

我们非常高兴地宣布我们在Cloud9中首次支持MySQL迭代.它使您可以轻松地在工作空间中轻松安装,启动和停止MySQL实例.令人高兴的是,每个工作区都将运行一个单独的数据库,因此您的项目将永远不会相互干扰.您可以使用从终端运行的mysql-ctl命令行工具来控制MySQL.

We are extremely happy to announce our first iteration of MySQL support in Cloud9. It makes it super easy to install, start and stop a MySQL instance right in your workspace. The nice thing is that every workspace will run a separate database so your projects will never interfere with each other. You can control MySQL with the mysql-ctl command line tool run from the terminal.

# start MySQL. Will create an empty database on first start
$ mysql-ctl start

# stop MySQL
$ mysql-ctl stop

# run the MySQL interactive shell
$ mysql-ctl cli

然后可以使用以下参数连接到数据库:

You can then connect to the database with following parameters:

Option    Value   Comment
Hostname  $IP The same local IP as the application you run on Cloud9
Port  3306    The default MySQL port number
User  $C9_USER    Your Cloud9 user name
Password  -   No password since you can only access the DB from within the workspace
Database  c9  The database name

当然,这仅仅是开始.例如,我们有计划添加管理UI来启动和停止数据库或预安装工具(例如phpMyAdmin).但是,我们不想让您等待完全集成的功能,而我们已经拥有了可以启用许多用例并且仍然非常易于使用的功能.

Of course this is just the beginning. We have for example plans to add a management UI to start and stop databases or pre-installing tools like phpMyAdmin. However we don’t want to make you wait for the fully integrated feature while we already have something that is enabling a lot of use cases and still super easy to use.

敬请期待和愉快的编码.

Stay tuned and happy coding.

这篇关于当我使用c9.io时,如何连接到MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆