Article 5C41M SLAMP with PHP changing how MySQL is used? (in general for everyone, will require converting all databases)

SLAMP with PHP changing how MySQL is used? (in general for everyone, will require converting all databases)

by
dchmelik
from LinuxQuestions.org on (#5C41M)
There's a term 'LAMP' many of you know that means 'Linux, Apache, MySQL, PHP' setup/server and though I think it should be GLAMP for GNU/Linux or even GAMP for GNU, 'SLAMP' could also mean 'Slackware, Apache, MySQL (or MariaDB,) PHP.' I have used those types of Slackware-stable servers several years, since maybe mid-0s or at least 2013.

When trying to restore a ZenPhoto SLAMP setup, it came to my attention that MySQL was deprecated and removed from PHP.

PHP's MySQL is replaced by MySQLi and PDO MySQL. It seems that Slackware-stable can do some of that and Slackware-current can do all of it. However, as often with *LAMP updates, the change seemed to make things more difficult rather than easier.

After the change I am no longer able to restore my ZenPhoto setup but I also have MediaWiki, GNU Social, and Diaspora setups to restore on SLAMP. I couldn't even start over with a new database for ZenPhoto because MySQLi just seems inoperable. What used to be very easy with MySQL/MariaDB now seems almost impossible.

I think a lot of people will be asking: how does one go about converting various SLAMP software's databases from 'MySQL' (MariaDB) to work with PHP with MySQLi or PDO MySQL instead, which apparently can already be used with MariaDB?

Here are types of errors I got trying ZenPhoto setup on Slackware-stable (after with my saved database just went to a blank page, just restarted with a blank new database and granted my user access... then after putting in MySQLi password and 'save,' just nothing happens)... of course, unless anyone actually uses this image/photo/art software, they shouldn't pay much/any attention to this problem/log.

Code:PHP Warning: mysqli_connect(): (HY000/2002): No such file or directory in /var/www/example/gallery/zp-core/functions-db-MySQLi.php on line 30, referer: http://example.com/gallery/zp-core/setup/index.php?autorun=gallery

PHP Warning: mysqli_connect(): (HY000/2002): Connection refused in /var/www/example/gallery/zp-core/functions-db-MySQLi.php on line 30However, it's not just with ZenPhoto (as other things I listed; ) anyone using any SL*MP setup may have major questions and issues on how to transition to MySQLi and/or PDO MySQL, enough that it might be a big topic and could use some articles/HOWTOs/tutorials.

If I can't convert my Diaspora social network nodes' database, I and others will lose our usernames for our Diaspora nodes. Certainly, it was a poor way for Diaspora to setup that if you lose your data, you lose your username (rather than just restart blank)... but that's how it is, and no one expected we'd have to convert a database, and make sure it's done exactly right, just to be able to keep our usernames.

As for backups & restores of MySQL databases, I distinctly recall two different methods (for each) using mysqldump. You might do it one way but then have to restore in a similar way, and if you don't do it the right way, it may not work for some software. One method saves & restores in one format, and another method (with an additional argument/flag/switch) in a slightly different format. For one piece of software I could only use a version that was saved in one of those two ways. The other times I had to just start over. I don't even know I have them all saved in the right way this time... and maybe it's fine if I restore in a way similar to how I backed up, but this will become an issue everyone has to deal with transitioning to MySQLi or PDO MySQL...latest?d=yIl2AUoC8zA latest?i=mWQAjqEmli0:eUX9x69zuwU:F7zBnMy latest?i=mWQAjqEmli0:eUX9x69zuwU:V_sGLiP latest?d=qj6IDK7rITs latest?i=mWQAjqEmli0:eUX9x69zuwU:gIN9vFwmWQAjqEmli0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments