updating mysql with latest mariadb - mariadb

I installed uWamp 3.1.0 but the php versions are quite old. I coulg update PHP to 7.4.4 using instructions found here. I tried the same with mariadb 10.4 butting the 32bit versione in bin\database\mariadb-10.4.12 and copuing my_uwamp.ini from old mysql 5 folder but the engine doesn't start.
Any hint?

If uwamp is running , stop services and close down.
At the time of writing this I am going to refer to the stable 10.4.12 version
Download the version of mariadb that you want to use. Download the .zip version instead of the installer.
https://downloads.mariadb.org/interstitial/mariadb-10.4.12/win32-packages/mariadb-10.4.12-win32.zip/from/http%3A//ftp.heanet.ie/mirrors/mariadb/
Go to your installed uwamp directory and click through to the bin/database directory
Create a directory / folder name of mariadb-10.4.12
Expand the files in to this directory
You now need to copy the data directory for the mysql-5.7.11 to the mariadb-10.4.12
This is due to uwamp creating special users to shutdown the sql server
Now create a file called my_uwamp.ini and save it in the mariadb-10.4.12 directory with your favourite text editor
Copy the text in between the ################## below and save as my_uwmap.ini
''''
##################
#
# Lots more settings can be configured from
# https://mariadb.com/kb/en/server-system-variables/
# Based on mariaDB 10.x and above
#
# When uwamp loads it will create the my.ini in the root mariadb directory and substitute the variables for the correct paths
# The MariaDB server
[mariadb]
# Directory where you want to put your data
datadir={MYSQLDATAPATH}
# Directory for the errmsg.sys file in the language you want to use
language={MYSQLPATH}/share/english
# This is the prefix name to be used for all log, error and replication files
log_basename=mariadb-error
log_error={MYSQLPATH}/mariadb-errors.log
# Enable logging by default to help find problems
general_log
log-slow-queries
##################
''''
This is the configuration file that uwamp looks for at startup and then substitutes the variables and saves as the my.ini in the mariadb-10.4.12 directory
You will be required to update the phpmyadmin application, this is stored in /uwamp/phpapps directory
Download the latest phpmyadmin package
https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.zip
Rename the /uwamp/phpapps/phpmyadmin directory to phpmyadmin-old or phpmyadmin.old
Create a new phpmyadmin directory and expand the files in to the phpmyadmin directory
Load up uwamp and select the mariadb in the sql dropdown.
There should be no errors reported in the log window.
Finally click on the MYSQL Config button
leave the old password as root
new password as -> root
reenter password as - > root
click on the OK button. Be patient as wait till the save has completed, this is just to update the uwamp user to assist with shutdown.
Now the default myphpadmin access should be set to username root and password root
You should be good to go ! If any problems drop us a line on here :)

Thanks for precious information!
Actual MariaDB distribution does not accept [log-slow-queries] parameter.
Instead, [slow_query_log] is supported.
Working template therefore would be:
##################
#
# Lots more settings can be configured from
# https://mariadb.com/kb/en/server-system-variables/
# Based on mariaDB 10.x and above
#
# When uwamp loads it will create the my.ini in the root mariadb directory and substitute the variables for the correct paths
# The MariaDB server
[mariadb]
# Directory where you want to put your data
datadir={MYSQLDATAPATH}
# Directory for the errmsg.sys file in the language you want to use
language={MYSQLPATH}/share/english
# This is the prefix name to be used for all log, error and replication files
log_basename=mariadb-error
log_error={MYSQLPATH}/mariadb-errors.log
# Enable logging by default to help find problems
general_log
slow_query_log
##################

Related

How to restore Apache configuration file in Bitnami

When running the bncert-tool on my LightSail server, I have accidentally modified some of Apache's configuration files which I now need to revert from the backup directories.
See previous question and answer here for more info: Modified Bncert command has taken site offline
I have looked in both the /opt/bitnami/apache2/conf and /opt/bitnami/apache2/conf/bitnami directories and can see a series of files including httpd.conf.back.202101220056 (/conf) and bitnami.conf.back.202101220056 (/bitnami).
My question is which backup files do I need need to copy to which location?
I assume it is performed via a 'mv' command.
Many thanks for your help.
On a bitnami stack the main Apache server configuration file is (httpd.conf)
When you are configuring server for SSL this is usually done in the file (bitnami.conf)
I would start by replacing the current bitnami.conf with the original bitnami.conf. Then restart your server so that the changes that effect. bitnami.conf is located in the directory apache2/conf/bitnami
If that does not fix it then replace the current httpd.conf with the original httpd.conf. Then restart your server so that the changes that effect. httpd.conf is located in the directory apache2/conf .
Note you will find it a lot easier to modify server files if you connect to your server with FileZilla. You can delete and drag and drop to copy files with FileZilla.

Wordpress path in bash script point to symlink?

I have a bash script on Ubuntu server that is used to do database backups via WP-CLI and use Dropbox Uploader to backup to Dropbox. The script has been working for years on our sites that don't use the Roots Bedrock stack. We recently started use the Bedrock Stack and Capistrano for deploys, and now I want to modify my script to backup databases on these sites. The problem lies in it appears, bash scripts don't understand symlinks for Wordpress path directive. With the Bedrock Stack and server setup, the public directory is a symlink of ~/current/web. Current is the symlink that Capistrano updates to point to the current revision directory. Anyone know how to modify my script to work with symlinks? Here is the script:
#!/bin/bash
# Script to create compressed backup archive of database.
# Set the date format, name, and directory for backups.
NOW=$(date +"%Y%m%d-%H%M")
BACKUP_DIR="/srv/users/serverpilot/apps/backup/public/site"
WP_PATH="/srv/users/serverpilot/apps/site/public"
# MySQL database names
DB_NAME="site_staging"
DB_FILE="site_staging_db_$NOW.sql"
DB_FILEGZ="site_staging_db_$NOW.sql.gz"
# Create the archive and the MySQL dump
wp db export --add-drop-table --path=$WP_PATH $BACKUP_DIR/$DB_FILE
gzip $BACKUP_DIR/$DB_FILE
bash /srv/users/serverpilot/./dropbox_uploader.sh upload $BACKUP_DIR/$DB_FILEGZ /site/
You can use readlink to resolve symbolic links, so in your case you could do something like this:
#!/bin/bash
# The symlinked directory you need to back up
symlink_dir="/srv/users/serverpilot/apps/site/public"
# Set $BACKUP_DIR as the resolved symlink
BACKUP_DIR=$(readlink -f "$symlink_dir")
# Use the absolute path in your backup script
echo "$BACKUP_DIR"
The manpage for readlink outlines a range of other output options.

I can't find init script for ldap on version 2.4.45

slapd executable file is not present in /etc/rc.d/init.d and also slapd.d directory is not present.
Please suggest me how to create it.
PS: I am able to start ldap with file "/usr/local/libexec/slapd"

Destination directory is not properly configured for Drupal

I keep getting the error on my Drupal 7 site - even after I have configured the logging and errrors to 'none'
I have made my tmp file writeable 777 and checked the file directory is correct under 'file system' I have made my sites/default/files directory writeable also
Cannot seem to get rid of this error - it reads:
The specified file temporary://fileg2e71m could not be copied, because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log.
Any suggestions?
Have resolved the issue:
It was an ownership issue where the files are owned by the Apache user. I Set PHP 5 to run in cgi-mode on my cPanel.
Drupal 7 and drupal 8 and 9:
After importing a Database, some paths are not quite well defined. Go to /admin/config/media/file-system and hit "Save Configuration". Now the Translations-import works fine.

How to copy a license file which is placed with the setup.msi to target directory (setup created with msifactory)

I have created a Setup file i.e. setup.msi , this file contains a website installer
I have a License.xml file that I want to give to my client with the installer (setup.msi).
Before running the setup.msi , client has to make sure that the License.xml file should be in the same directory where setup.msi resist.
I want my setup.msi file to copy the License.xml file to the Destination directory (where website will be installed , this path will be prompted to user for customization)
I am using MSIFactory for creating setup.msi. I am not able to do this. I searched over net but did not get any accurate answer.
I am not familiar with MSIfactory, but in installshield what I would do is, call a batch script to do the copy and pass the target directory as a parameter to it. or use the 'XCopyFile' function to do the copying.

Resources