


What to do if linux php has insufficient permission to connect to mysql
Linux PHP has insufficient permissions to connect to MySQL: 1. Grant query, insert and other permissions to ordinary data users by using the grant command; 2. Grant permissions to create tables and indexes to database developers through grant. .
What should I do if linux php has insufficient permission to connect to mysql?
Linux php has insufficient permissions to connect to mysql. Mysql fine-grained permissions division:
mysql can grant you a user such as select, insert, update, delete, etc. One or more of the permissions mainly use the grant command. The usage format is:grant 权限 on 数据库对象 to 用户
grant select on testdb.* to common_user@’%’ grant insert on testdb.* to common_user@’%’ grant update on testdb.* to common_user@’%’ grant delete on testdb.* to common_user@’%’
grant select, insert, update, delete on testdb.* to common_user@’%’
grant 创建、修改、删除 mysql 数据表结构权限。 grant create on testdb.* to developer@’192.168.0.%’; grant alter on testdb.* to developer@’192.168.0.%’; grant drop on testdb.* to developer@’192.168.0.%’; grant 操作 mysql 外键权限。 grant references on testdb.* to developer@’192.168.0.%’; grant 操作 mysql 临时表权限。 grant create temporary tables on testdb.* to developer@’192.168.0.%’; grant 操作 mysql 索引权限。 grant index on testdb.* to developer@’192.168.0.%’; grant 操作 mysql 视图、查看视图源代码 权限。 grant create view on testdb.* to developer@’192.168.0.%’; grant show view on testdb.* to developer@’192.168.0.%’; grant 操作 mysql 存储过程、函数 权限。 grant create routine on testdb.* to developer@’192.168.0.%’; - now, can show procedure status grant alter routine on testdb.* to developer@’192.168.0.%’; - now, you can drop a procedure grant execute on testdb.* to developer@’192.168.0.%’;
grant all privileges on testdb to dba@’localhost’
grant all on *.* to dba@’localhost’
grant select on *.* to dba@localhost; - dba 可以查询 mysql 中所有数据库中的表。 grant all on *.* to dba@localhost; - dba 可以管理 mysql 中的所有数据库
grant select on testdb.* to dba@localhost; - dba 可以查询 testdb 中的表。
grant select, insert, update, delete on testdb.orders to dba@localhost;
grant select(id, se, rank) on testdb.apache_log to dba@localhost;
grant execute on procedure testdb.pr_add to ’dba’@’localhost’ grant execute on function testdb.fn_add to ’dba’@’localhost’
show grants;
show grants for dba@localhost;
grant all on *.* to dba@localhost; revoke all on *.* from dba@localhost;
grant select on testdb.* to dba@localhost with grant option;
PHP Video Tutorial"
The above is the detailed content of What to do if linux php has insufficient permission to connect to mysql. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

Docker is important on Linux because Linux is its native platform that provides rich tools and community support. 1. Install Docker: Use sudoapt-getupdate and sudoapt-getinstalldocker-cedocker-ce-clicotainerd.io. 2. Create and manage containers: Use dockerrun commands, such as dockerrun-d--namemynginx-p80:80nginx. 3. Write Dockerfile: Optimize the image size and use multi-stage construction. 4. Optimization and debugging: Use dockerlogs and dockerex

Safely handle functions and regular expressions in JSON In front-end development, JavaScript is often required...

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

In MySQL, the function of foreign keys is to establish the relationship between tables and ensure the consistency and integrity of the data. Foreign keys maintain the effectiveness of data through reference integrity checks and cascading operations. Pay attention to performance optimization and avoid common errors when using them.

CentOS is the first choice for server and enterprise environments for its superior security, stability and performance. 1) Security provides forced access control through SELinux to improve system security. 2) Stability is supported by the LTS version for up to 10 years to ensure the stability of the system. 3) Performance significantly improves system response speed and resource utilization by optimizing kernel and system configuration.

MySQL is suitable for rapid development and small and medium-sized applications, while Oracle is suitable for large enterprises and high availability needs. 1) MySQL is open source and easy to use, suitable for web applications and small and medium-sized enterprises. 2) Oracle is powerful and suitable for large enterprises and government agencies. 3) MySQL supports a variety of storage engines, and Oracle provides rich enterprise-level functions.
