Category MYSQL

php mysql update variable

Goal: Update wordpress post with PHP cli < ?php $con = mysql_connect("localhost","root","[redacted]"); if (!$con) { echo "Unable to connect to DB: " . mysql_error(); exit; } if (!mysql_select_db("wordpress")) { echo "Unable to select mydbname: " . mysql_error(); exit; } $myfileText…

mysql insert cdn sync tool

To manually update the CDN Sync Tool table (for wordpress plugin CDN Sync Tool) try this MySQL Insert Statement: Replace the id with the latest id on your table Manually insert row to cdn sync table INSERT INTO `wordpressdb`.`prefix_cst_new_files` (`id`,…

howto move mysql freebsd without dump

to move mysql on freebsd without using a dump file follow these steps: stop mysql copy /var/db/mysql to its new location chown -R mysql:mysql modify and add line mysql_dbdir=”“ modify and change mysql_dbdir=”/var/db/mysql” to the new location of…

rename mysql schema

How can you rename a mysql Schema? easy! Create the new schema In this example the new schema is called my_new_schema mysqladmin -u root -p create my_new_schema Dump the old schema and pipe in to new schema mysqldump -u root…

redmine all users projects query

Ever needed to get all projects associated with every user in redmine?  Here’s a query that will help Multiple Joins sql query; To get user, all projects associated with user and role on that project.  Exmaple: Table Column Names users id,…