Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rekabis

Pages: [1]
1
Installation / Re: Cannot connect to MySQL, db_conn.php is missing
« on: April 16, 2018, 03:50:49 PM »
The list of errors has shortened dramatically:

Code: [Select]
Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0


Trying to start mysql server, please wait!
Try to restart CentOS Web Panel with command: sh /scripts/restart_cwpsrv

**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:

But I am still having problems.

I noticed that in the db_conn.php file, there was an entry for an encryption password. Does this need to be filled in order to clear up more errors?

EDIT: One sec, the password I was successful in logging onto MySQL with last night is no longer being accepted as the MySQL root password. I did *NOT* change it in the meantime.

EDIT 2: Okay, this is VERY, VERY WEIRD: even when I change the password through the change MySQL password script, I am unable to log onto MySQL using the new password. I was able to conduct a change password last night and was able to log into MySQL directly using the new password, but this morning it does not work.

EDIT3: And I Have confirmed that the change password script does change /root/.my.cnf and db_conn.php.

EDIT4: Okay, it is now Whisky Tango Foxtrot time. Remember how I said that one of my first actions were to re-set the MySQL root password? Yes, I did. I really, really did. And I even checked that new password afterwards, by logging straight into MySQL, and it was successful.

I have now discovered that the MySQL change root password script does NOTHING. Yes, it updates /root/.my.cnf and db_conn.php file with the “new” password it creates, but I have just discovered that any new password it creates is not actually used within MySQL. As in, I use the script, but MySQL does not recognize the new password.

In fact, it recognizes only the original password used on system install. It doesn’t even recognize the second password that was set up with my initial script run any more.

So my system now appears to be up and running, error free, using the original system install MySQL password even though the change password script was run, twice.

Confused? Join the club.

2
Installation / Cannot connect to MySQL, db_conn.php is missing
« on: April 16, 2018, 01:10:29 AM »
Clean installation of CentOS 7 and CWP Control Web Panel. No errors anywhere.

Upon final reboot, I am able to access the login page for the control panel, but upon attempting to log in, I get the following error page:

Code: [Select]
Warning: main(../../resources/admin/include/db_conn.php): failed to open stream: No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: main(../../resources/admin/include/db_conn.php): failed to open stream: No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: main(): Failed opening '../../resources/admin/include/db_conn.php' for inclusion (include_path='.:/usr/local/cwp/php71/lib/php') in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: main(/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php): failed to open stream: No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: main(): Failed opening '/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php' for inclusion (include_path='.:/usr/local/cwp/php71/lib/php') in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Notice: Undefined variable: db_host in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Notice: Undefined variable: db_user in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Notice: Undefined variable: db_pass in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Notice: Undefined variable: db_name in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Notice: Undefined variable: db_host in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Notice: Undefined variable: db_user in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Notice: Undefined variable: db_pass in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Notice: Undefined variable: db_name in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:

Please note:

  • I have confirmed that MySQL is installed and running properly by logging into MySQL using the root password provided during the installation summary.
  • I have re-set the MySQL root password via /scripts/mysql_pwd_reset, and again confirmed that it was up and running by logging in using the new root password provided by the script.
  • I have confirmed that /root/.my.cnf exists and has the proper MySQL root username and password.
  • I have gone to /usr/local/cwpsrv/htdocs/resources/admin/include/ and have confirmed that db_conn.php does NOT exist in that directory.

Essentially, I need to know where I can find a db_conn.php file to shoehorn into the correct directory.

Pages: [1]