Troubleshooting nuBuilder Installation issues: Difference between revisions

From nuBuilderForte
Jump to navigation Jump to search
No edit summary
(Updated Troubleshooting nuBuilder Installation issues)
 
(4 intermediate revisions by 2 users not shown)
Line 12: Line 12:
</pre>
</pre>
* [https://stackoverflow.com/questions/40724046/mysql-gtid-consistency-violation The long term solution]
* [https://stackoverflow.com/questions/40724046/mysql-gtid-consistency-violation The long term solution]
* [https://forums.nubuilder.com/viewtopic.php?f=19&t=10893 Forum Post]
* [https://forums.nubuilder.cloud/viewtopic.php?f=19&t=10893 Forum Post]


=== No Database error ===
=== No Database error ===
Line 20: Line 20:
</pre>
</pre>
The database has to be created manually first.
The database has to be created manually first.
=== Access denied for user 'root'@'localhost' ===
The error "Access denied for user 'root'@'localhost'" typically indicates that the user 'root' is not authorized to access the MySQL database on 'localhost' with the provided credentials. Here are some steps to troubleshoot this error:
* Check the username and password: Make sure that the username and password you're using to connect to MySQL are correct. If you're not sure what the correct credentials are, try resetting the root password.
* Check the host: Make sure that you're connecting to the correct host. If you're connecting to 'localhost', make sure that the MySQL server is running on the same machine as the one you're connecting from.
* Check the privileges: Check that the 'root' user has the necessary privileges to access the database. To do this, you can run the following command in the MySQL console:
<pre>
SHOW GRANTS FOR 'root'@'localhost';
</pre>
This will show you the privileges that the 'root' user has on the 'localhost' host.
* Check the firewall: Make sure that the firewall is not blocking the MySQL server from accepting connections. If you're using a firewall, make sure that the MySQL server is allowed to accept connections from the machine you're connecting from.
* Check the MySQL log: Check the MySQL log for any error messages that might provide more information about the error. The MySQL log is typically located in the /var/log/mysql/ directory on Linux systems.


== Troubleshooting techniques ==
== Troubleshooting techniques ==
Line 31: Line 53:
* Then view the '''nuDebug''' results (CTRL+SHIFT+D) after the queries have run.
* Then view the '''nuDebug''' results (CTRL+SHIFT+D) after the queries have run.
* Also verify/run the queries in phpMyAdmin (replace ? with the record id).
* Also verify/run the queries in phpMyAdmin (replace ? with the record id).
* [https://forums.nubuilder.cloud/viewtopic.php?f=31&t=10941 Forum Post]: Use ''nuGetValue()'' and ''nuSetValue()''
* If '''nuDebugMode''' is set to true in '''nuconfig.php''', a warning is output in the developer console if the object (HTML element) does not exist. This way you can see which objects do not exist or have been renamed and therefore can no longer be found.

Latest revision as of 15:09, 25 February 2023

Errors and Fixes

v4.5 SQLSTATE[HY000]: General error: 1786

  • PHP v5.6 introduced some changes that may result in errors like:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nubuilder4.___nu1604ddfc9e7288___' doesn't exist
  • In my.cnf, make the following changes and restart MySQL
gtid_mode=OFF
enforce_gtid_consistency=OFF

No Database error

The following error occurs if the database does not exist:

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1049] Unknown database 'nubuilder4'

The database has to be created manually first.


Access denied for user 'root'@'localhost'

The error "Access denied for user 'root'@'localhost'" typically indicates that the user 'root' is not authorized to access the MySQL database on 'localhost' with the provided credentials. Here are some steps to troubleshoot this error:

  • Check the username and password: Make sure that the username and password you're using to connect to MySQL are correct. If you're not sure what the correct credentials are, try resetting the root password.
  • Check the host: Make sure that you're connecting to the correct host. If you're connecting to 'localhost', make sure that the MySQL server is running on the same machine as the one you're connecting from.
  • Check the privileges: Check that the 'root' user has the necessary privileges to access the database. To do this, you can run the following command in the MySQL console:
SHOW GRANTS FOR 'root'@'localhost';


This will show you the privileges that the 'root' user has on the 'localhost' host.

  • Check the firewall: Make sure that the firewall is not blocking the MySQL server from accepting connections. If you're using a firewall, make sure that the MySQL server is allowed to accept connections from the machine you're connecting from.
  • Check the MySQL log: Check the MySQL log for any error messages that might provide more information about the error. The MySQL log is typically located in the /var/log/mysql/ directory on Linux systems.

Troubleshooting techniques

Trace with nuDebug

  • As a general debug technique add some nuDebug() calls in the code especially after each nuRunQuery().
    nuDebug($sql, "#RECORD_ID#");
  • Then view the nuDebug results (CTRL+SHIFT+D) after the queries have run.
  • Also verify/run the queries in phpMyAdmin (replace ? with the record id).
  • Forum Post: Use nuGetValue() and nuSetValue()
  • If nuDebugMode is set to true in nuconfig.php, a warning is output in the developer console if the object (HTML element) does not exist. This way you can see which objects do not exist or have been renamed and therefore can no longer be found.