Php

     
I keep getting the following errors with mysql connection through XAMPP and I don"t know what to do:

*

That"s the code in the config.inc.php

I"ve already remix the password from MySql from the comm& line two times & added the changes to this code above và to lớn the php.ini tệp tin, but at each time it goes baông chồng khổng lồ the error. Any help?


*

*

yo need create the web1_user "pma" in mysql or change this lines(web1_user and password for mysql):

/* User for advanced features */$cfg<"Servers"><$i><"controlweb1_user"> = "pma"; $cfg<"Servers"><$i><"controlpass"> = "";Linux: /etc/phpmyadmin/config.inch.php


*

*

Add this line khổng lồ the tệp tin xamppphpMyAdminconfig.inc:

$cfg<"Servers"><$i><"port"> = "3307";Here, my port is 3307, you can change it khổng lồ yours.

Bạn đang xem: Php


*

In terminal, log inkhổng lồ MySquốc lộ as root. You may have sầu created a root password when you installed MySquốc lộ for the first time or the password could be blank, in which case you can just press ENTER when prompted for a password.

suvì mysql -p -u rootNow add a new MySquốc lộ web1_user with the web1_username of your choice. In this example we are calling it pmaweb1_user (for phpmyadmin web1_user). Make sure to lớn replace password_here with your own. You can generate a password here. The % symbol here tells MySQL khổng lồ allow this web1_user to log in from anywhere remotely. If you wanted heightened security, you could replace this with an IP. address.

CREATE USER "pmaweb1_user"
"%" IDENTIFIED BY "password_here";Now we will grant superweb1_user privilege khổng lồ our new web1_user.

GRANT ALL PRIVILEGES ON *.* TO "pmaweb1_user"
"%" WITH GRANT OPTION;Then go khổng lồ config.inch.php ( in ubuntu, /etc/phpmyadmin/config.inc.php )

/* User for advanced features */

$cfg<"Servers"><$i><"controlweb1_user"> = "pmaweb1_user"; $cfg<"Servers"><$i><"controlpass"> = "password_here";
Share
Improve sầu this answer
Follow
answered Jan 14 "19 at 6:03
KashmiriKashmiri
87988 silver badges1313 bronze badges
1
Add a comment |
14
Add these lines lớn the tệp tin xamppphpMyAdminconfig.inc:

$cfg<"Servers"><$i><"controlweb1_user"> = "root"; $cfg<"Servers"><$i><"controlpass"> = "";
Share
Improve this answer
Follow
edited Aug 12 "19 at 22:57
zx485
24.2k2626 gold badges4545 silver badges5353 bronze badges
answered Aug 12 "19 at 22:38
taufiktaufik
17911 silver badge88 bronze badges
Add a bình luận |
8
My mặc định 3306 port was in use, so Ive changed it to 8111, then I had this error. Ive sầu fixed it by adding

$cfg<"Servers"><$i><"port"> = "8111";into config.inh.php . If you are using different port number then set yours.


Share
Improve sầu this answer
Follow
edited Atruyền thông quảng cáo 17 "trăng tròn at 12:19
Dharman
21.9k1818 gold badges5757 silver badges107107 bronze badges
answered Aug 28 "19 at 5:43
A. AskarovA. Askarov
36744 silver badges88 bronze badges
0
Add a bình luận |
5
Linux / Ubuntu:If installed phpmyadmin via apt:sudo apt-get install phpmyadmin php-mbstring

Can check /etc/phpmyadmin/config-db.php for changing the web1_user credentials.

$dbweb1_user="pma";$dbpass="my_pass";$basepath="";$dbname="phpmyadmin";$dbserver="localhost";$dbport="3306";$dbtype="mysql";
Share
Improve this answer
Follow
answered Aug 13 "19 at 16:50
User ReboUser Rebo
6591010 silver badges1717 bronze badges
Add a comment |
4
The Connection for controlweb1_user as defined in your configuration failed, right after:

$cfg<"Servers"><$i><"controlweb1_user"> = "pma";$cfg<"Servers"><$i><"controlpass"> = "you_password";
Share
Improve sầu this answer
Follow
edited Aug 31 "19 at 9:15
El.Hum
1,59533 gold badges1111 silver badges2121 bronze badges
answered Aug 31 "19 at 5:52
Saurabh NaikeleSauraBảo Hành Naikele
5122 bronze badges
Add a bình luận |
4
I solved the problem by adding the line skip-grant-tables lớn the my.ini:

# The MySQL serverskip-grant-tablesport= 3306...Under XAMPP Control Panel > Section "MySQL" > Config > my.ini


Share
Improve this answer
Follow
edited Atruyền thông quảng cáo 18 "20 at 14:01
answered Aquảng cáo 15 "đôi mươi at 15:30
NiklasNiklas
15877 bronze badges
Add a comment |
2
I experienced the same errors on a fresh install of VestaCPhường. I solved the issues by following the instructions on this video clip.

Restart Apache, NGINX and MySQL servers.That"s it!
Share
Improve sầu this answer
Follow
answered Nov 7 "18 at 23:30
nicozicanicozica
40366 silver badges1616 bronze badges
Add a comment |
2
Might be late khổng lồ the buổi tiệc ngọt - also, this answer is for LAMP. web1_users who got to this thread from google, like me.

Basically, the problem is PMA is trying lớn connect to lớn SQL with a web1_user that doesn"t exist.

At /etc/phpmyadmin/config-db.php, you will find 2 variables: $dbweb1_user, & $dbpass.Those specify the MySQL web1_user and Password that PMA is trying to connect with.

Now, connect with some web1_username/password that work (or just "root" if you are connecting from localhost), create a new web1_user with global priviliges (e.g - %PMA User% with password %Some Random Password%), then in the above sầu mentioned file set:$dbweb1_user = %PMA User% ;$dbpass = %Some Random Password%;

You might also change other stuff there, like the VPS address ($dbserver), the port ($dbport, which might not be the mặc định one on your machine), and more.


Share
Improve this answer
Follow
answered Feb 27 "19 at 12:26
ron wizzleron wizzle
3966 bronze badges
Add a phản hồi |
2
I just finished web1_setting up my XAMPPhường on the MAC and had the same trouble. I just fixed it. It is not quite clear what OS you"re using but you need lớn run the XAMPPhường security. You indicate you"ve done that, but here it is anyway for the MAC

suvì /Applications/XAMPP/xamppfiles/xampp security Set your password on the questions you get.

Xem thêm: Cách Chạy Quảng Cáo Google Adwords Hiệu Quả, Hướng Dẫn Tự Chạy Quảng Cáo Google Adwords

In you"re phpmyadmin import the "create_tables.sql" .. Which can be found in the ./phpmyadmin/sql folder.

Next open the config.inch.php tệp tin inside the ./phpmyadmin folder.

$cfg<"Servers"><$i><"controlweb1_user"> = "pma";$cfg<"Servers"><$i><"controlpass"> = "you_password";Make sure khổng lồ log out and log in to reflect the changes within phpmyadmin


Share
Improve this answer
Follow
edited Aquảng cáo 7 "19 at 15:38
Tikhổng lồ Amoo
29322 silver badges1414 bronze badges
answered Aquảng cáo 10 "18 at 18:58
DanielDaniel
4,36522 gold badges2424 silver badges3030 bronze badges
Add a phản hồi |
2
I changed in file config.inch.php

$cfg<"Servers"><$i><"host"> = "127.0.0.1";to

$cfg<"Servers"><$i><"host"> = "localhost";and it worked!


Share
Improve sầu this answer
Follow
answered May 30 at 6:43
community wiki
Sumit Waghmare
Add a phản hồi |
1
consider changing host entry 127.0.0.1 to localhost or even the IPhường. address of the hệ thống.

$cfg<"Servers"><$i><"host">
Share
Improve sầu this answer
Follow
edited Jul 3 "18 at 12:51
Hassaan
6,35555 gold badges2525 silver badges4444 bronze badges
answered Dec 21 "17 at 2:48
TheSatinKnightTheSatinKnight
55455 silver badges1111 bronze badges
Add a phản hồi |
1
if your port is 3307 (based on your port)

Add this line in xamppphpMyAdminconfig.inc: after i++

$cfg<"Servers"><$i><"port"> = "3307";
Share
Improve sầu this answer
Follow
answered Aug 30 "19 at 19:15
JIDULAL V MJIDULAL V M
1922 bronze badges
Add a comment |
1
This error is caused by a line of code in /usr/share/phpmyadmin/libraries/sql.lib.php.

It seems when I installed phpMyAdmin using apt, the version in the repository (phpMyAdmin v4.6.6) is not fully compatible with PHPhường 7.2. There is a newer version available on the official website (v4.8 as of writing), which fixes these compatibility issues with PHP 7.2.

You can download the latest version and install it manually or wait for the repositories khổng lồ update with the newer version.

Alternatively, you can make a small change khổng lồ sql.lib.php to lớn fix the error.

Firstly, backup sql.lib.php before editing.

1-interminal:

subởi cp /usr/share/phpmyadmin/libraries/sql.lib.php /usr/share/phpmyadmin/libraries/sql.lib.php.bak2-Edit sql.lib.php. Using vi:

subởi vi /usr/share/phpmyadmin/libraries/sql.lib.phpOR Using nano:

sudo nano /usr/share/phpmyadmin/libraries/sql.lib.phpPress CTRL + W (for nano) or ? (for vi/vim) & tìm kiếm for (count($analyzed_sql_results<"select_expr"> == 1)

Replace it with ((count($analyzed_sql_results<"select_expr">) == 1)

Save file và exit. (Press CTRL + X, press Y & then press ENTER for nano web1_users / (for vi/vim) hit ESC then type :wq và press ENTER)