0

running webadmin for years now - and having troubles for months - and posting here for weeks. But the support seems to be not the best...

want to run sql-commands on the newest version - but it fails all the time

USE jo ;
SHOW GLOBAL VARIABLES LIKE 'PORT';

gives back the following

Failed to execute SQL : SQL USE jo ; SHOW GLOBAL VARIABLES LIKE 'PORT'; failed : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW GLOBAL VARIABLES LIKE 'PORT'' at line 1

while

USE jo ;
SHOW GRANTS FOR CURRENT_USER;

gives back the following

Failed to execute SQL : SQL USE jo ; SHOW GLOBAL VARIABLES LIKE 'PORT'; failed : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW GLOBAL VARIABLES LIKE 'PORT'' at line 1

hmm - i have no ideas why the comands fail all the time!?

see the manual on this sql-command: https://beginner-sql-tutorial.com/sql-use-database.htm

SQL USE Statement The USE Statement is used to select a database and perform SQL operations into that database. The database remains default until end of session or execution of another USE statement with some other database.

SQL USE DATABASE Statement: The Syntax for the USE Statement is:

USE database_name; database_name - is the name of the database to be selected

USE DATABASE Example: If you want to use database MyDatabase, the statement would be like USE MyDatabase ;

btw i am running the versions MySQL version 5.5.33 PHP 5.6.39

update

by the way: if i do not use USE then it works propperly

if i run

SHOW GLOBAL VARIABLES LIKE 'PORT';
Output from SQL command SHOW GLOBAL VARIABLES LIKE 'PORT'; ..

or

SHOW GRANTS FOR CURRENT_USER;

i get outputs like this one

Output from SQL command SHOW GRANTS FOR CURRENT_USER; ..
Grants for root@localhost
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*4444444rrrrrrwwwww222222444443660283C379783ED8EF54B6EC01DAF8374444444rrrrrrrrrrrreeeeewwwww2CeC3C474F4' WITH GRANT OPTION
GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION

and now i have to rethink what this does want to say in the context of a - error in trying to establish a db-connection - while installing a wordpress on the frontend

pope
  • 11
  • 1
  • 1
    5.5 is not the newest version of MySQL. There is 5.6, 5.7 and 8.0. – ypercubeᵀᴹ Jun 16 '19 at 12:37
  • But how are you running these? Through some web interface? Have you tried using the command line interface and did you get the same error? – ypercubeᵀᴹ Jun 16 '19 at 12:38
  • Sounds like a problem with webadmin, not with MySQL specifically. The mysql comand line interface would be able to run these commands. – dbdemon Jun 16 '19 at 13:13
  • hello your both - see the updates that show that i can run thecode without the use -statement. Now - what is left is the interpretation of the results in the light of the problems like - error in establishing a db connection when tryin to install a wordpress. – pope Jun 16 '19 at 14:27
  • 1
    Did you check the log_error ? If should reveal the cause of your problem. – Luuk Jun 16 '19 at 16:17
  • If the web tool you are using is not able to run multiple statements at a time (does not separate them at the semicolon) you will see exactly this problem. Just use a different one (most of the tools don’t require the use anyway as you can specify on login what dB you want to prefer) – eckes Jun 16 '19 at 17:27

0 Answers0