如何从 cpanel 访问终端中 root 创建的数据库?
我这里有一个问题,不知道该怎么办。
我正在我的服务器上运行游戏,想要添加控制面板脚本。它使用我在 root 帐户下为游戏创建的数据库。但我还在 cpanel 中为控制脚本创建了数据库和用户。
这是我的错误
Mysqli 扩展未加载。请验证您的 PHP 配置。
我相信该脚本无法访问我在 root 下创建的数据库。由于脚本配置使用 cpanel mysql 用户和数据库信息,以及我在终端中创建的 mysql 用户和数据库。有没有办法给我为脚本创建的 mysql 用户访问我在 root 下创建的数据库的所有权限?
I have an issue here, not sure what to do.
I am running a game on my server and wanted to add a control panel script. It uses the databases I've created for the game under the root account. But I've also created a database and user for the control script in cpanel.
This is my error
Mysqli extension not loaded. Please verify your PHP configuration.
I believe the script is not getting access to the databases I created under root. Since the script config uses the cpanel mysql user and database info, and the mysql users and databases I've created in the terminal. Is there a way to give the mysql user I created for the script access/all priveleges to the Databases I created under root?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个错误与 mysql 权限无关,它表示 mysqli 扩展未随您的 php 配置加载,
如果扩展文件安装在您的服务器上,您只需将其加载到 php.ini 文件中,
找到此php.ini 文件中的行并取消注释:
只需删除“;”从该行的开头。并重新启动你的apache,如果不起作用,那么它需要安装它,
对于mysql数据库,你可以使用root登录到你的mysql服务器,并向你想要的任何用户授予所需的权限,如下所示:
问候,
This Error isn't related to the mysql permissions, it says that the mysqli extension isn't loaded with your php config,
if the extension files installed on your server, you just need to load it in your php.ini file,
find this line in your php.ini file and uncomment it:
just remove the ";" from the begin of the line. and restart your apache, if doesn't work, so it needs to install it,
For the mysql databases, you can login to your mysql server with root and grant the required permissions to any user you want, like this:
regards,