search
HomeDatabasephpMyAdminSeveral methods for setting login password in phpmyadmin

The following column phpmyadmin tutorial will introduce you to several methods of setting the login password for phpmyadmin. I hope it will be helpful to friends in need!

Several methods for setting login password in phpmyadmin

config.inc.php

Unconfigured phpMyAdmin is very insecure, vulnerable to attacks, or cannot be used normally at all. phpMyAdmin has 3 types of authorization Mode:

1.cookie: Display a web login page, enter the mysql username and password, and then enter the management interface

2.http: Display a windows login box, enter the mysql user name and password, and then enter the management

3.config: Fill in the mysql user name and password directly into config.inc.php, do not display the login interface, directly enter the management interface

phpMyAdmin The configuration file name is config.inc.php. The modification method of config.inc.php in each version is as follows:

Previous version 2.6: Change config.inc.sample.php to config.inc. php

2.7 version: Change config.default.php to config.inc.php

2.8 version: Use the configuration script '/script/setup.php' to generate the configuration file, the generated file Copy it and save it manually as config.inc.php

Configuration script provided for version 2.8 or above:

1. Use cookie authorization mode to change 'auth_type' to 'cookie', and then modify' blowfish_secret' uses an arbitrary string as the encrypted string of the cookie. If there is no encryption key, the system will display "The configuration file now requires a top-secret phrase password (blowfish_secret)". The configuration file is as follows:

$cfg[' Servers'][$i]['auth_type'] = 'cookie'; $cfg['blowfish_secret'] = '44e2f5aece2855.93921574';

After modification, the web login page in http authorization mode

2. Use config authorization mode

config requires these parameters:

$cfg['Servers'][$i]['auth_type'] = 'config';   //授权模式
$cfg['Servers'][$i]['user'] = 'root';         //mysql登陆用户
$cfg['Servers'][$i]['password'] = '12345';    //mysql登陆用户密码

3. Use http authorization mode

$cfg['Servers'][$i]['auth_type'] = 'http';

http authorization mode login window

Note: If the mysql server uses version 4.1 or above, and the client connection uses mysql 4.1 or below, be careful to use the OLD_PASSWORD function when setting the password for the user,

Example:

mysql > SET PASSWORD = OLD_PASSWORD('12345')
mysql > /G

Appendix: (The following content is written by myself)

In addition to the above three methods that come with phpmyadmin, you can also use the configuration of apache to restrict login, and place a . htaccess file, specify the password record file to use.

Then use htpasswd to generate a password and save it in the password record file (the content of the file is encrypted, use the method htpasswd /etc/php_passwd username).

Contents in httpd.conf:

phpmyadmin's directory"> 
AllowOverride AuthConfig

Contents of .htaccess file

authtype basic authuserfile /etc/php_passwd authname information require valid-user

We can see that the content in the /etc/php_passwd file is similar to this:

username:2Y2CD6nfJuwL6

phpmyadmin Cancel the maximum file limit change solution

When importing a large database with phpmyadmin, it appears:

No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.

First check the php.ini configuration file In the following three places, upload_max_filesize, memory_limit and post_max_size, it is recommended that the modified values ​​​​be slightly larger than the imported sql database file; after modifying the above three values ​​​​in php.ini, restart the php environment, or restart the computer, When importing again, although phpmyadmin still displays the maximum import limit: 20,48KB, large database files can be imported successfully.

The above is the detailed content of Several methods for setting login password in phpmyadmin. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:csdn. If there is any infringement, please contact admin@php.cn delete
phpMyAdmin and MySQL: The Perfect CombinationphpMyAdmin and MySQL: The Perfect CombinationApr 23, 2025 am 12:04 AM

phpMyAdminandMySQLtogetherenhancedatabasemanagementbyprovidingeaseandefficiency.1)phpMyAdminoffersauser-friendlyinterfaceformanagingMySQLdatabases,2)itallowsforeasyexecutionofSQLqueries,import/exportofdatabases,andmanagementofuserpermissions,3)itaids

MySQL and phpMyAdmin: Core Features and FunctionsMySQL and phpMyAdmin: Core Features and FunctionsApr 22, 2025 am 12:12 AM

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.

phpMyAdmin: Generating and Executing SQL QueriesphpMyAdmin: Generating and Executing SQL QueriesApr 21, 2025 am 12:03 AM

The methods of generating and executing SQL queries in phpMyAdmin include: 1. Enter the query in the SQL tab and click to execute; 2. Use JOIN to merge table data; 3. Use index and LIMIT when optimizing queries. phpMyAdmin simplifies database management through an intuitive interface, supporting SQL query operations from basic to advanced.

MySQL and phpMyAdmin: How They Work TogetherMySQL and phpMyAdmin: How They Work TogetherApr 20, 2025 am 12:05 AM

We need to combine database management with a user-friendly interface because this can improve efficiency and convenience. 1) MySQL handles complex data storage and queries, 2) phpMyAdmin provides intuitive web interface to simplify management, 3) The two collaborate to implement data operations through SQL commands, and 4) phpMyAdmin displays the results in a user-friendly way.

phpMyAdmin and SQL: Exploring the ConnectionphpMyAdmin and SQL: Exploring the ConnectionApr 19, 2025 am 12:05 AM

phpMyAdmin manages MySQL databases by generating and executing SQL statements. 1. The user operates through the web interface, 2.phpMyAdmin generates SQL statements, 3. Sends to the MySQL server for execution, 4. Returns the result and displays it in the browser.

phpMyAdmin: Key Features and Capabilities ExplainedphpMyAdmin: Key Features and Capabilities ExplainedApr 18, 2025 am 12:04 AM

phpMyAdmin is a web-based MySQL database management tool that allows users to manage databases through a graphical user interface (GUI). 1. It interacts with the MySQL database through PHP scripts, converts user operations into SQL queries and renders the results. 2. Basic usage includes creating databases and tables, such as creating databases named 'my_database' and 'users' tables. 3. Advanced usage supports complex queries and user permission management, such as finding users with specific user names. 4. Common error debugging techniques include checking SQL syntax, managing permissions, and viewing logs. 5. Performance optimization suggestions include index optimization, query optimization and ensuring security.

phpMyAdmin's Interface: Simplifying SQL OperationsphpMyAdmin's Interface: Simplifying SQL OperationsApr 17, 2025 am 12:01 AM

phpMyAdmin simplifies SQL operations through a graphical interface and improves database management efficiency. 1) Provide an intuitive GUI without directly writing SQL statements; 2) Interact with MySQL through PHP scripts to transparently handle complex operations; 3) Support basic operations such as creating tables and advanced functions such as data export. Pay attention to permissions and SQL syntax errors when using it, and optimize queries, regular backups and ensure security settings.

SQL and phpMyAdmin: A Beginner's GuideSQL and phpMyAdmin: A Beginner's GuideApr 16, 2025 am 12:02 AM

Beginners can learn SQL and phpMyAdmin from scratch. 1) Create database and tables: Create a new database in phpMyAdmin and create tables using SQL commands. 2) Execute basic query: Use SELECT statement to query data from the table. 3) Optimization and best practices: Create indexes, avoid SELECT*, use transactions, and regularly back up databases.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools