user registration form details NOT saved in cpanel Database Table.
I created a registration form on my website to register users for my website.However the users are are not showing on Database users table. the error log shows
PHP Warning: mysqli_connect(): (28000/1045): Access denied for user 'djboziah_josiah'@'localhost'
(using password: YES) in /home4/djboziah/public_html/registration/server.php on line 11.
I created the Database and Database user in my sql cpanel, and provided the user all full privileges. The weird thing is the database shows no privileges when i check it in phpmyadmin, ill attach the image that shows no privileges. i will attach the php code.
$db = mysqli_connect('localhost', 'XXXX', 'XXXX', 'djboziah_registration');-
Hi sypheit, What you've described is nothing out of the ordinary. The user and database privileges are not stored in the database you made - djboziah_aunthentication. They're stored in the mysql database called 'mysql', specifically in the 'users' table. Here's from my cPanel server: ================================================================================= [root@devpanel ~]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3306 Server version: 5.7.30 MySQL Community Server (GPL) Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SELECT user,host,authentication_string FROM mysql.user WHERE host = "localhost" ; +---------------+-----------+-------------------------------------------+ | user | host | authentication_string | +---------------+-----------+-------------------------------------------+ | jsonbourne | localhost | *0F578778EDAA1623943F95A9B515F562F8C2AC4E | | mysql.session | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | | mysql.sys | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | | root | localhost | *44C63FA794C9386897D9BD6AFD4410BAB8DA8568 | +---------------+-----------+-------------------------------------------+ 4 rows in set (0.00 sec) ================================================================================= If you have root access, you can view the mysql.user table from the WHM PHPMyAdmin tool. 0 -
@plesk4lyf is correct but when you set the privileges through the UI it should update them anywhere this is necessary to be. Since your profile indicates you may not have root access I'd suggest contacting your hosting provider for further assistance with this. 0
Please sign in to leave a comment.
Comments
2 comments