Reputation: 105
I did a custom installation for MySQL and only included the MySQL shell, the server, and the Python connector in the installation.
But I don't know where the JavaScript prompt MySQL JS >
came from.
And because of that I can't connect Python and MySQL.
Upvotes: 10
Views: 18767
Reputation: 1353
If you are faced with the JS>
prompt after running the MySQL shell, like so:
where JS means JavaScript, then you can change modes by issuing one of the following shell commands:
\sql
\py
\js
For SQL mode, Python mode, and JavaScript mode, respectively. Like so:
If you want to change the prompt permanently, then you need to set the defaultMode
option, like so:
\option --persist defaultMode=sql
at the JS>
, PY>
, or SQL>
prompt.
You can also list
the option
settings with:
\options -l
The Configuring MySQL Shell Options page in the MySQL documentation explains this all in great detail.
Upvotes: 0
Reputation: 11
If there is someone who got this error and was expecting "Mysql>" rather than "MySQL js>" or even "MYSQL SQL>", you have opened a wrong program. You need to open MySQL x.x command line client program rather than mysql shell program.
Upvotes: 0
Reputation: 1
[1. write " \sql " (this will convert SQL-JS to sql ] 2. write as shown in the image
\sql \connect root localhost
Upvotes: -1