Does anybody know if there is a way to make autocompletion work in MySQL Command Line Client under Windows? It's working nicely under Linux for me, but simply moves the cursor under Windows instead.
It ought to work this way:
C:\> mysql --auto-rehash
Or configure your my.cnf:
[mysql]
auto-rehash
edit: My apologies. I have found some references that the tab-completion feature in mysql client works only on UNIX/Linux. It does not work on Windows.
update: The reason for this is mentioned briefly in MySQL bug #4731:
[31 Jul 2004 12:47] Sergei Golubchik
I just downloaded 4.0.15 - command
completion in mysql.exe is NOT
working, as expected. It was never
working in mysql.exe because we were
not able to make readline to compile
with VC++.
mysqlc.exe is a cygwin build, and it is linked with readline.
Explanation: GNU readline is a standard open-source library for handling user input. The MySQL team uses the readline library, but they are not its author. From the above comment, I understand that they were unsuccessful in compiling the readline library on Windows with Microsoft Visual C++, the tool they use to build the MySQL product. Some open-source projects have not been made fully compatible with the Microsoft Windows environment.
At one time in the past, the MySQL product provided an alternative client they called mysqlc.exe, which they compiled with the cygwin toolset on Windows, but they don't provide this anymore. The cygwin toolset includes the readline library, so it was possible to compile the mysqlc.exe client with support for tab-completion.
So in theory, if you are really intrepid, you could download the cygwin toolset including the readline library, then download the MySQL source code and build it using cygwin. Then you should have a mysql client program that can perform tab-completion. But this sounds like a lot of work even for someone who is familiar with building MySQL from source.
This is probably not what you are looking for, but the enterprise version of SQLYog offers a somewhat limited schema auto-completion.
If above dosen't work and you use widnows 10 you can install linux shell, then install mysql-client and connect like in terminal in linux where autocomplite works.
Instruction:
https://learn.microsoft.com/en-us/windows/wsl/install-win10
Related
I want to use MySQL for an electron app in production and thus, if the client machine doesn't has MySQL already installed on it, then the app will not be able to function. So, is there any way to execute a auto-install MySQL script that installs MySQL on the client machine, even if its not already installed.
Since the app has to be cross-platform, so I am looking for a standard or minimum effort procedure (to speed up the process) to achieve the above, during first-time-app-startup on Windows7+, Ubuntu 14+ and macOS.
I found the following ways to auto-install:
Windows : Link
Linux & macOS: Create a bash script that runs before first-time-startup of the app. (Although, it will check whether MySQL instance is already present on the machine or not)
Looking for a better option than the above mentioned ones.
You may wish to consider the BitNami MySQL distribution; I have always used their VMs when I went after their products, but stand-alone installers are offered for most platforms (including Linux).
(Edit: It seems that the installer for MySQL is offered only for Linux x64)
Trying to open MySQL Utilities in the MySQL Workbench and get the following error:
"The command line MySQL Utilities could not be located. To use them, you must download and install the utilities package for your system from www.mysql.com. Click on the Download button to proceed."
However, when I go to the address and download/install, this does not fix the issue.
How do I fix or get around this issue?
I'm running Windows 8.1 64-bit
in error the system is not able to recognize it (MySQL Utilities could not be located) and in default assumes thats Python has been installed and the whole library are developed with Python :
The library is written entirely in Python, meaning that it is not necessary to have any other tools or libraries installed to make it work. It is currently designed to work with Python v2.6 or later and there is no support (yet) for Python v3.1.
so if you don't have Python on your system just install and its should fix the problem.
I need to read a database table from inside a Lua script in pdns-recursor on a Scientific Linux 6.4 server which comes with Lua pre-loaded.
Apparently I have to use luarocks to install luasql. When I attempt to install luasql I get:
Checking Lua includes... lua.h not found
lua.h is not on the server.
I tried removing the installed version so I could install from binary but then that trashed the system which apparently uses the installed Lua for everything (yum, rpm, etc). Now I have to reload OS. How can I get MySQL access from embedded Lua?
Thanks in advance.
I assume that you have already checked yum to see if luasql is available through that; if not, you should first do that, and install it through yum if possible.
The immediate cause of the problem you're having is that luarocks automatically builds modules from source, which requires access to the lua headers. These are not needed simply to run programs that use Lua, so they are not installed as part of the normal Lua package. I'm not familiar with Scientific Linux, but you can probably get them by installing a package named lua-dev, lua-devel, lua-headers, or some variant thereof. You may also need the mySQL packages (both the libraries proper and the headers). Once you have those installed, give it another try.
You might also try LuaDist, which I find to be generally more polished than luarocks, and capable of automatically downloading more dependencies; in particular it probably will not require the lua headers installed, and can handle automatically downloading and installing lua itself from source. It does, however, require CMake installed.
If for some reason you can't install the required headers and can't get luarocks or luadist working, you can try downloading and building luaSQL by hand. The Lua headers can be found in the Lua 5.1 source package and LuaSQL 2.2. Assuming the Scientific Linux maintainers haven't excessively customized the version of lua they ship with it, the results should be compatible with the system Lua install.
I need to create a C program that requires a MySQL database. For this, I've seen on the web that I need to use a MySQL connector (which I installed in my PC). I run my code with Code::Blocks/mingw and I don't know how to add the mysql libraries to it.
To connect to a MySQL database I need the mysql.h file (I have the file but I don't know where to place it in my computer). Can you guys help me?
If you're using mingw, then from mingw installer you should find the support for MySQL library. If it doesn't appear there, then you can download the MySQL-devel source tarball and then compile and install it with mingw (you need GCC and other software building tools installed). In this way you'll get support of mysqllib support in mingw like GNU/Linux environment.
I have downloaded the MySQL community server and extracted the files from the .tar file. But how do I install it? I simply cannot find a easy way to to this, or any method for that matter. Or is it already installed after tar xvf MySQL.tar? And also, when installing the .pkg version, shouldn't it create the files anywhere? Finally, the community server is the one used with django right?
Thanks in advance!
I would suggest using the .dmg version. It's an easier way of installing mysql, it can be a pain http://dev.mysql.com/downloads/mysql/
If you are developing and testing, do you really need to use MySQL? You can use sqlite which is bundled with Python.
As Vezu suggested, the best way to get started with the server is to download the binary installer - the mysql-5.5.24-osx10.6-x86.dmg file.
If you plan to use it with Python, you will also need to install MySQLdb for OSX. For that, see this answer for a link to steps you need to follow.