mysql Archives - draghici.net https://draghici.net/tag/mysql/ A web developer's ideas Tue, 24 Nov 2026 18:35:51 +0000 en-US hourly 1 https://wordpress.org/?v=7.1.5 https://draghici.net/app/uploads/2017/06/cropped-keyboard-grayscale-150x150.jpg mysql Archives - draghici.net https://draghici.net/tag/mysql/ 32 32 Host old apps in containers with Debian 12 https://draghici.net/host-old-apps-in-containers-with-debian-12/ Fri, 29 Nov 2024 13:06:05 +0000 https://draghici.net/?p=5925 I have recently had to start some software based on a very old PHP version. Since having that directly on the operating system will open it to vulnerabilities, containerization seems to be a good choice. To accomplish this task we will use a VPS from DigitalOcean, also known as a droplet. We will start with […]

The post Host old apps in containers with Debian 12 appeared first on draghici.net.

]]>
React form with zod validation and a canvas https://draghici.net/react-form-with-zod-validation-and-a-canvas/ Fri, 29 Mar 2024 17:47:34 +0000 https://draghici.net/?p=5499 I was recently asked to help with creating a form to submit certain tax redirections for a non-profit organization. I recently decided to have less code samples in the articles I write. I worry that much code might distract the reader from the actual point of the articles: which is the overall architecture of what […]

The post React form with zod validation and a canvas appeared first on draghici.net.

]]>
A PHP PDO mysql helper class used in SlimPHP applications https://draghici.net/php-pdo-mysql-helper-class-used-slimphp-applications/ Sat, 09 Dec 2017 00:50:34 +0000 https://draghici.net/?p=936 This is a very simple example on how to use SlimPHP and PDO in a basic API that updates, lists and deletes entries from a table. If you are new to building APIs with SlimPHP, then this is a good starting point. The class itself: The database dependency: Example usage:

The post A PHP PDO mysql helper class used in SlimPHP applications appeared first on draghici.net.

]]>
MariaDB on Raspberry PI won’t start https://draghici.net/mariadb-raspberry-pi-wont-start-solved/ Thu, 19 Jan 2017 22:05:36 +0000 https://draghici.net/?p=729 The summary of the error encountered is: LSB: Start and stop the mysql database server daemon Running service mysql status outputs: ● mysql.service - LSB: Start and stop the mysql database server daemon    Loaded: loaded (/etc/init.d/mysql)    Active: activating (start) since Thu 2017-01-19 17:30:05 EET; 15s ago   Control: 4205 (mysql)    CGroup: /system.slice/mysql.service […]

The post MariaDB on Raspberry PI won’t start appeared first on draghici.net.

]]>
Mysql: Export select rows to CSV on server https://draghici.net/mysql-export-select-rows-csv-server/ Wed, 11 Jan 2017 14:15:55 +0000 https://draghici.net/?p=726 Use the following command to export the query rows to a file on the server in the CSV format. SELECT * FROM `table` INTO OUTFILE '/var/www/file.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'; Source: http://stackoverflow.com/questions/356578/how-to-output-mysql-query-results-in-csv-format

The post Mysql: Export select rows to CSV on server appeared first on draghici.net.

]]>
MariaDB – allow user to connect from anyhost https://draghici.net/mariadb-allow-user-connect-anyhost/ Wed, 15 Jun 2016 19:15:38 +0000 https://draghici.net/?p=578 Use the following command in your server to allow user to connect from anyhost:

The post MariaDB – allow user to connect from anyhost appeared first on draghici.net.

]]>
Enable access to MySQL/MariaDB from any host in Linux https://draghici.net/enable-access-to-mysqlmariadb-from-any-host-in-linux/ Sat, 27 Feb 2016 11:56:16 +0000 https://draghici.net/?p=520 Commands: Source:

The post Enable access to MySQL/MariaDB from any host in Linux appeared first on draghici.net.

]]>
Updating the URL of a WordPress website with SQL commands https://draghici.net/updating-the-url-of-a-wordpress-website-with-sql-commands/ Sat, 12 Dec 2015 18:33:30 +0000 https://draghici.net/?p=374 Use the following commands to change the URL of a WordPress website directly inside the mysql database:

The post Updating the URL of a WordPress website with SQL commands appeared first on draghici.net.

]]>
WordPress – db_term_taxonomy reset count https://draghici.net/wordpress-db_term_taxonomy-reset-count/ Mon, 27 Oct 2014 00:00:00 +0000 https://draghici.net/2014/10/27/wordpress-db_term_taxonomy-reset-count/ Reset the term count:

The post WordPress – db_term_taxonomy reset count appeared first on draghici.net.

]]>
WordPress – delete all media files https://draghici.net/wordpress-delete-all-media-files/ Thu, 16 Oct 2014 00:00:00 +0000 https://draghici.net/2014/10/16/wordpress-delete-all-media-files/ To delete the media files without leaving traces in the database, do the following:

The post WordPress – delete all media files appeared first on draghici.net.

]]>
Set internal encoding to UTF-8 for php https://draghici.net/set-internal-encoding-to-utf-8-for-php/ Tue, 26 Aug 2014 00:00:00 +0000 https://draghici.net/2014/08/26/set-internal-encoding-to-utf-8-for-php/ Use the following code in your script to set the internal php encoding to UTF-8: Also, for mysql and postgres you should take into consideration the following two commands:

The post Set internal encoding to UTF-8 for php appeared first on draghici.net.

]]>
Great SQL injection tutorial https://draghici.net/great-sql-injection-tutorial/ Mon, 04 Aug 2014 00:00:00 +0000 https://draghici.net/2014/08/04/great-sql-injection-tutorial/ A great SQL injection tutorial can be found here:

The post Great SQL injection tutorial appeared first on draghici.net.

]]>