Datatabase error: Commands out of sync

This seems to be a problem with “orphaned SELECT statements”. It is described here in more detail. One solution would be to create a temporary table and modify my_acquireuserpasswd to save data to temp_table BEGIN DECLARE passwdtemp VARCHAR(64); DECLARE temp VARCHAR(4000); START TRANSACTION; SELECT id, passwd INTO uid1, passwdtemp FROM users WHERE name = name1; … Read more

how to check for wordpress Query errors

A good pointer would be to enable debugging in WordPress. Add this to your wp-config.php: define( ‘WP_DEBUG’, true );. By default WordPress does not show much debug information. More on this here.

MySql Database In WordPress Multisite

I think you might be new with WP Multisite. That is OK. I’m using Multisite for last few years and I really don’t know any way to put the different site tables in different database. The way WP Multisite works is a single WP installation for multiple WP site. Now suppose you have a database … Read more

using same mysql user with many databases

Well it’s really not good practise, but this depends on how you’re accessing the other databases. For example, I have a server that hosts 10+ different WordPress sites. I have two options for connecting to the databases: Use the root login in all my wp-config.php files as it’s easier Create a user and logins associated … Read more

Help with sorting and storing data on WordPress

Why do you want to go for a custom MYSQL database altogether? You can simply use custom post types for products. Please check http://codex.wordpress.org/Post_Types You can add images, custom fields such as review, ratings etc. There are many plugins that can help you create custom post types easily. https://wordpress.org/plugins/custom-post-type-ui/ https://premium.wpmudev.org/project/custompress/ There is another plugin you … Read more

Write mysql credentials in plugin

As long as you aren’t passing out the plugin and other people don’t have access to it, you should be fine. You might add something like the following to the top of the file just in case though: defined(‘ABSPATH’) or die(‘Access denied’); That will simply make sure that the file is loaded via wordpress (e.g. … Read more

MySQL database gives blank page (white screen of death)

From the looks of it, you should be changing the pre-existing urls from /www.mypage.no to /localhost The /var/www is part of the file path normally (though i suppose you could potentially set the server up that way…), so more than likely wordpress thinks it is at /var/www relative to the web root instead of /. … Read more