如何连接PHPMYADMIN DB来创建DB

发布于 2024-08-31 01:11:00 字数 120 浏览 1 评论 0原文

我正在尝试创建批处理文件,该文件将在 Jommla 数据库、Phpmy admin 中创建表, 我正在尝试使用 mysql -uroot -ptest conf 连接数据库 但它没有连接到数据库。

问候 新开发

I am trying to create the batch file which will create the table in Jommla Database, Phpmy admin,
I am trying to connect DB with mysql -uroot -ptest conf
but it is not connecting to the database.

regards
NewDev

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

折戟 2024-09-07 01:11:00

如果 MySQL 服务器位于您的本地机器上,则命令(注意空格)如下:

mysql -u root -p

输入该命令后,它将提示您输入 root 密码。如果您要连接到远程服务器(并且通常不应该允许以 root 身份进行远程连接),您可以使用类似的方法,在 -h 之后替换服务器的 IP:

mysql -h 123.456.789.101 -u root -p

一旦您登录中,您将能够根据需要运行CREATE DATABASE

If the MySQL server is on your local box, then the command (note the spacing) is this:

mysql -u root -p

It will prompt you for your root password after you enter that command. If you're connecting to a remote server (and you generally shouldn't allow remote connections as root) you'd use something like this, substituting your server's IP after -h:

mysql -h 123.456.789.101 -u root -p

Once you've logged in, you'll be able to run CREATE DATABASE as needed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文