Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D7 installation fails with Drush 8.x: Incorrect table name 'mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead #6183

Open
csandanov opened this issue Dec 17, 2024 · 5 comments

Comments

@csandanov
Copy link

Describe the bug
Drupal 7 installation fails when using latest stable mariadb-client (Alpine 3.21)

To Reproduce

Expected behavior
Installation completes without errors

Actual behavior
Error thrown

System Configuration

Q A
Drush version? 8.5.0
Drupal version? 7.x
PHP version 8.x
OS? Linux

Additional information

Executing: mysql --defaults-extra-file=/tmp/drush_fdoGcc --database=drupal --host=mariadb --silent  < /tmp/drush_jbNBcc > /dev/null
Notice: y: SHOW TABLES; [0.14 sec, 7.46 MB]                             [notice]
Executing: mysql --defaults-extra-file=/tmp/drush_hDkIad --database=drupal --host=mariadb --silent  < /tmp/drush_JLiEad
  mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
Notice: y: DROP TABLE `mysql: Deprecated program name. It will be       [notice]
removed in a future release, use '/usr/bin/mariadb' instead` [0.17
sec, 7.47 MB]
Executing: mysql --defaults-extra-file=/tmp/drush_fLmGfg --database=drupal --host=mariadb --silent  < /tmp/drush_gMdBfg
Error: to create database: mysql: Deprecated program name. It will be    [error]
removed in a future release, use &#039;/usr/bin/mariadb&#039;
instead--------------DROP TABLE `mysql: Deprecated program name. It
will be removed in a future release, use &#039;/usr/bin/mariadb&#039;
instead`--------------ERROR 1103 (42000) at line 1: Incorrect table
name &#039;mysql: Deprecated program name. It will be removed in a
future release, use &#039;/usr/bin/mariadb&#039; inste&#039; [0.2
sec, 7.47 MB]
Returned from hook drush_core_pre_site_install [0.2 sec, 7.47 MB]        [debug]
Notice: dispatch complete [0.2 sec, 7.42 MB]                            [notice]
  mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
  --------------
  DROP TABLE `mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead`
  --------------
  
  ERROR 1103 (42000) at line 1: Incorrect table name 'mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' inste'
@adubovskoy
Copy link

Same issue when I want to import db for the same reason.

drush sql:cli < ../backup.sql :

In Process.php line 270:
                                                                               
  The command "mysql --defaults-file=/tmp/drush_KblbgB --database=drupal --ho  
  st=mariadb --port=3306 -A" failed.                                           
                                                                               
  Exit Code: 1(General error)                                                  
                                                                               
  Working directory: /var/www/html/drupal/web                                  
                                                                               
  Output:                                                                      
  ================                                                             
                                                                               
                                                                               
  Error Output:                                                                
  ================                                                             
  mysql: Deprecated program name. It will be removed in a future release, use  
   '/usr/bin/mariadb' instead                                                  
  ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not  
   support it              

@csandanov
Copy link
Author

In my case I didn't see the SSL error which was discussed in wodby/drupal-php#104

@MakerTim
Copy link
Contributor

MakerTim commented Jan 2, 2025

In both cases it was an TLS/SSL error, but the deprecated warning remains.
Following finding of ddev/ddev#6861, the deprecation warning comes from the binary not starting with mariadb.
And I like the quote from stasadev

if MariaDB wants to distance itself from MySQL, we should not hide it under aliases or functions

Or is the less intrusive way for, "if binary mariadb exists, use that" a better approach?

@greg-1-anderson
Copy link
Member

PRs welcome; however, we must be mindful to not break older installations that are still using mysql.

@MakerTim
Copy link
Contributor

MakerTim commented Jan 3, 2025

Since 2018 (the licence change of Oracle) mysql-client is a wrapper/alias/... for mariadb-client
For example the Alpine web interface shows this well: https://pkgs.alpinelinux.org/package/edge/main/x86/mysql-client
There it requires mariadb-client, and provides no binaries to the path.

If you add the Oracle repository, and install mysql-client of them, you will not get mairadb-client
Therefor my suggested approach is to follow the "if binary existst" flow that has been implemented here before
https://github.com/drush-ops/drush/pull/5787/files#diff-10f1c3eb1bfecf60e08f33df32da80b7f586d992637f4fde660fed01f0161c52R15

Can make a proof-of-concept PR

MakerTim pushed a commit to MakerTim/drush that referenced this issue Jan 3, 2025
"mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead"
MakerTim pushed a commit to MakerTim/drush that referenced this issue Jan 6, 2025
"mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants