Skip to main content

mysql dump FLUSH TABLES access denied

I've recently upgraded the server Ubuntu 20.04 updating the PHP version from 7.4 to 8.1.  However, when I've attempted to export the MySQL database using the command

drush sql-dump --extra-dump=--no-tablespaces --result-file=../sql/db-2023-02-25.sql

I seeing the following response

brew changing PHP versions on OSX

Installing PHP on OSX and it installed PHP 8.2.x.  However, for my applications I need to run 8.1.x.  How do you switch the current PHP version?

 

Current version

Check the current PHP version by executing the command

php -v

Response:

Drupal toc_js explode() deprecated function

A recent upgrade to PHP 8.1, has highlighted an error that hadn't been appearing previously.

Deprecated function : explode(): Passing null to parameter #2 ($string) of type string is deprecated in toc_js_node_view()(line 130 of modules/contrib/toc_js/toc_js.module).

In the top_js.module file from L124

how to update composer

Looking at composer I first wanted to check the current version, which is actioned by running the following command

composer -V

The response I was seeing

Composer version 2.1.5 2021-07-23 10:35:47

 

 

git remove files from being tracked

How do you remove a file from git?

Use the command (rm) to remove files from your local git repository

git rm --cached

It's important to note the --cached flag deletes the file from your git repository, it becomes an untracked file in your project folder.  For the change(s) to kick in, you need to commit the changes.

OSX brew regular commands

Regular commands for brew

 

Brew update

This updates Homebrew itself.  Keeping Homebrew current with the command brew update.  Note, before running this command, it can take some time (if you haven't run it recently).  It is highly recommended that you run the update before trying to install a package.

brew update

Response

How to move your Git repo to another location

Moving a Git repo due to a change of agencies

 

Steps to change the repo:

1. Create a temporary directory

Create a temporary directory obviously where your other sites are located locally.  For me, this is in the Sites directory.

mkdir temp-dir

 

2. Clone

Begin by cloning the current repo in the directory generated above

Subscribe to