Hi. I started mysqld.exe using Wine and it seems to work. But when I try to connect the server seems to answer somehow (connection is established, telnet works) but it seems that no communication takes place. mysql freezes and in telnet no response is shown. Any idea what this could mean? Running in Windows without an installer works so it has to be some problem with wine somehow. Using Ubuntu 10.04 and Wine 1.2.2 (default). Any help would be appreciated. Joern
On 2/26/11 4:04 PM, jheid wrote:> Hi. > > I started mysqld.exe using Wine and it seems to work. > But when I try to connect the server seems to answer somehow (connection is established, telnet works) but it seems that no communication takes place. mysql freezes and in telnet no response is shown. >Are you able to log into the same MySQL database under Linux? (I know this is a stupid question, but you should have answered this in your post.) James McKenzie
On Sat, 2011-02-26 at 17:04 -0600, jheid wrote:> > I started mysqld.exe using Wine and it seems to work. > But when I try to connect the server seems to answer somehow > (connection is established, telnet works) but it seems that no > communication takes place. mysql freezes and in telnet no response is > shown. >Are you sure mysqld.exe is listening on the expected port? The Mysql 5.5 manual clearly says that the Windows version uses a Unix socket file rather than a TCP/IP port if you set the host name to localhost or didn't specify one. If this is the case, I wouldn't expect telnet to find it because it only works over TCP/IP. Find out what port mysqld is listening on by reading its configuration file and then see what TCP ports are open by running the commands: lsof | TCP | less nmap -p1-65535 Why are you running the Windows version rather than the native Linux version of mysqld anyway? Any Windows program should be able to talk to the Linux version using a TCP connection *and* you can start the Linux version as a service and leave it running 24/7 while the Windows version under Wine will be killed when you log out, just like anything else running under Wine. Martin
Martin Gregorie wrote:> > The Mysql 5.5 manual clearly says that the Windows version uses a Unix > socket file rather than a TCP/IP port if you set the host name to > localhost or didn't specify one. >I used mysql -h 127.0.0.1 -p <port> Martin Gregorie wrote:> > If this is the case, I wouldn't expect > telnet to find it because it only works over TCP/IP. Find out what port > mysqld is listening on. >I set the listening port in the command line. It's quite simple to test: telnet on this port gives an error message when the mysqld.exe isn't started otherwise I get the connection. Same with mysql. So, the socket is opened but the communication fails. Martin Gregorie wrote:> > Why are you running the Windows version rather than the native Linux > version of mysqld anyway? Any Windows program should be able to talk to > the Linux version using a TCP connection *and* you can start the Linux > version as a service and leave it running 24/7 while the Windows version > under Wine will be killed when you log out, just like anything else > running under Wine.I want to use it to generate an installer for Windows. I want to import a dump and pack this into the installer. The import takes a while that's why I don't want to import a file while installation. That's the same I would do using Postgres for instance.
Martin Gregorie wrote:> On Sun, 2011-02-27 at 01:03 -0600, jheid wrote: > > > Martin Gregorie wrote: > > > > > > > > The Mysql 5.5 manual clearly says that the Windows version uses a Unix > > > socket file rather than a TCP/IP port if you set the host name to > > > localhost or didn't specify one. > > > > > > > > > > > > I used mysql -h 127.0.0.1 -p <port> > > > > > -p <port> is never going to work. You need -P because -p is used to > supply a password. Try: > > mysql --host=localhost --port=<port> --protocol=tcp > > My native Mysql 5.5 is listening on port 9092, so this works: > > mysql --host=localhost --port=9092 --protocol=tcp > > All three arguments must be supplied or it complains about not being > able to use a pipe connection. Similarly, this works: > > telnet localhost 9092 > > and spits out gobbledegook. Ctrl-C cancels. > > > MartinThanks, I meant "-P" of course. I tried the same command but no connection can be established - mysql just "hangs". Telnet just brings # telnet 127.0.0.1 8808 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. No command gives any reply then. I tested the newest mysqld but I don't even get it to work: "TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS" although I set --port. Perhaps I have to set something inside Wine to make it work?
Thanks for your help. I'm using the following command wine mysqld.exe -O lower_case_table_names=0 --lower_case_table_names=0 --innodb_data_file_path=ibdata1:100M --innodb_data_home_dir=Z:\\mysql-win-demo\\data\\ibdata --innodb_log_group_home_dir=Z:\\mysql-win-demo\\data\\ibdata\\log --innodb_mirrored_log_groups=1 --innodb_log_files_in_group=3 --innodb_log_file_size=5M --innodb_log_buffer_size=8M --innodb_flush_log_at_trx_commit=1 --innodb_buffer_pool_size=16M --innodb_additional_mem_pool_size=2M --innodb_file_io_threads=4 --innodb_lock_wait_timeout=50 --master-port=8808 --port 8808 --default-character-set=latin1 --basedir=Z:\\mysql-win-demo --datadir=Z:\\mysql-win-demo\\data --console --standalone --bind-address=127.0.0.1 with mysql-5.1.55-win32.zip. I haven't edited any configuration file. This works in a DOS shell but not with my Ubuntu....
Martin Gregorie wrote:> > You'd save a lot of typing by putting most of these in a configuration > file, my.cnf, any putting that in C:\my.cnf or in the same directory as > mysqld.exe. >Of course. I just like a one liner for flexibility :)> > Try adding a line containing "hostname=localhost" to the configuration > file. >No change. [/quote]Please explain: by 'not with my Ubuntu' do you mean running mysqld.exe under Wine or do you mean using the native Linux mysqld executable? I thought you said you were trying the Linux version after getting no joy with the EXE.[/quote] No, I have tested mysqld.exe with an older and the newest mysql using Wine on Ubuntu. Running the same command line on Windows works, with Wine it does not work.
Martin Gregorie wrote:> ....Or do the most sane thing - use native Linux version of mysql server. Works perfectly and windows programs can easily connect to it.
jheid wrote:> I'm using the Linux mysqld now and copy the data files to the Windows version. They seems to be binary compatible, but I don't think I can rely on this. Well, works for me now.Do not ever do that. If you want to safely copy mysql database from one server to another always ALWAYS use mysqldump. And again, explain why are you using windows version of mysql? Especially running it under Wine???
As I said before: I'm generating an installer for Windows on my Linux machine (in fact, every day). I'm using NSIS for this. I bundle a database (MySQL) with the application so my target is MySQL win. I could do something like importing a dump during installation but this will take some time depending on the machine the installer will run. So I want to generate the whole mysql-Windows-binary-distribution on Linux. Easiest way would be to run mysqld.exe using wine, import the data, and bundle all this into the installer. This doesn't seem to work. So, I use the same MySQL version running on Linux and do a copy of the whole data directory to the Windows mysql path. As the files seems to be binary compatible this works right now but as soon as there are differences in the files between the different ports of MySQL this will fail. Hope, it's understandable.