Recommended MySQL tuning utility for Windows - mysql

I have been using MySQL Tuner (http://mysqltuner.com) on Linux for a while and am quite comfortable with it. Now, for whichever reason, we have had to start hosting other websites on IIS. Is there a similar tuning utility that may recommend config changes to MySQL on Windows Server 2008?
Kind regards

I have just ported the mysqltuner.pl script to Windows - see http://mysqltuner.codeplex.com/. It uses the same checks as version 1.2 of the mysqltuner.pl script, but in a nice, friendly Windows application - no need to install Cygwin or Perl.

Ok so this is over a year after the question but I thought it relevant because you can actually still use the mysqltuner script if you combine it with Cygwin.
Install Cygwin
Make sure Perl is installed
Additionally I installed the mysql and the mysqld packages as well (Needed for the script to connect to a "remote" MySQL.
Copy the mysqltuner.pl script to your Cygwin user home directory (Found under cygwin_install_dir/home/your.user)
Start the Cygwin terminal
Run the script $ perl mysqltuner.pl --host mysql_host_ip --forcemem 512
If you encounter an error in the line of:
ERROR 1130 (HY000): Host 'somename.company.com' is not allowed to connect to this MySQL server
Go to the database server and add the appropriate user and privelages
You should now be able to use mysqltuner in a windows environment against local as well as remote MySQL servers.
...screenshots removed because I'm not allowed to use images yet, sorry.

Don't know of another tool (outside the MySQL Instance Configuration Wizard you can run) like mysqltuner which will not run unfortunately. You can install Perl on Windows, but when run the .pl file you will get an error about $PATH not having mysqladmin in it. Upon reading of the manual laughing, it plain as day states there is no Windows support for 1.2.0 version of tool.
You can see if these suggestions help in the interim:
http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/
Edit: I just found this: http://www.webyog.com/webyog/monyogscreenshots
MONyog, it is a paid product, though. I installed the trial and it looks very promising. It monitors your SQL server and gives you alerts and recommendations based on those alerts. Might be worth a look. I cannot vouch for too much other than it has some nice information in just a short period of time.

Related

Confused with different types of MySQL applications to install

I'm very new to MySQL.
My question is about installation of MySQL on my Mac (Mojave OS) to learn and practice it to later use it with node.js.
First I got it with Homebrew, but then I wasn't able to use it with the Workbench - I set up the password for root user but I didn't find any commands list to work with it since it refused to do any operations with it in workbench and I didn't find any command.
Then I downloaded Community Server - I have a server through system prefs, but I don't have a command line interface - which I need for writing queries.
After that I downloaded MySQL Shell. But as far as I researched I found that is it not standard CLI (found it here https://stackoverflow.com/questions/58367813/how-to-uninstall-mysql-shell-on-macos).
My question is next.
As an example, when I started learning MongoDB I had MongoDB Compass and MongoDB Shell - one helped me to work with commands, the other one helped to see results visually.
MySQL has a language which I want to learn and practice with (SELECT, USE etc.). How can I do the same what I did with MongoDB but in the case of MySQL? What should I install, and why Homebrew MySQL version is different than any other MySQL version (even commands - such as mysql.server start) and there is no documentation for it in MySQL docs?
Unfortunately, there's no such nice installer for macOS as there is for Windows. Instead you have to install the different parts individually.
For the type of work you plan to do I recommend to install at least 2 pieces:
The MySQL server, which holds your data. On macOS this comes with a preferences pane, which you can use do some basic management of the server (start/stop, directory settings).
MySQL Workbench, a visual design, query and management tool. That will give you GUI support for your DB work.
The server also comes with the classic shell, which you can launch by running mysql in a terminal. That's sometimes quicker for simple work, compared to launching a full GUI.
A better command line tool is the MySQL Shell, a new and highly improved variant of the classic shell, which will eventually replace the old classic shell entirely in the future. So it's certainly no mistake to install that too.
I hope that clarifies which pieces are required to start working with MySQL.

Executable trying to connect to wrong MySQL socket file location

I have a set of executables (specifically BOINC server executables, but I don't think it matters) that I am trying to run on an Ubuntu 16.04 system. These executables were built on a different machine and use a version of the MySQL client library that was built on a RHEL 6.6 box (the release plan is to build everything on the RHEL 6.6 box and deploy it together, but the current executables were not built there).
The RHEL 6.6 box is configured to put its MySQL socket file at /var/lib/mysql/mysql.sock.
The Ubuntu 16.04 box is configured to put its MySQL socket file at /var/run/mysqld/mysqld.sock.
When I try to run one of the executables that connects to the database on the Ubuntu 16.04 box, I get the following error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
The error comes straight out of the mysql_real_connect function. Only these executables give me that error. The mysql commend works fine. mysql_config --socket returns /var/run/mysqld/mysqld.sock, just as I expect it to.
I have tried all the suggestions I could find about editing the config files. I have added both a ~/.my.cnf file and a /etc/mysql/mysql.conf.d/client_socket.cnf file that specify the socket file location in a [client] section, per all the other sources for dealing with socket file locations. None of it changed the behavior of the executables; they always look for /var/lib/mysql/mysql.sock as if something were hard-coded to do it. I can't find anything that is, though.
I have been beating my head against this problem for a while, and I cannot figure out what is going on. I ended up opening up the permissions on /var/lib/mysql and symlinking the real socket file to the expected location, but that feels like a hack. What is going on here? Why are my executables seemingly ignoring all MySQL system configuration? What is the proper way to fix this? Could this actually be hard-coded somewhere?
I just searched the BOINC source tree and tend to think that it is not hard code in the literal sense of the word but it is fixed at compilation time. See
https://github.com/BOINC/boinc/search?utf8=%E2%9C%93&q=mysql&type=
The proper fix to me is to either compile the BOINC source tree yourself on your machine, to use the cloud images prepared by the BOINC developers https://boinc.berkeley.edu/trac/wiki/CloudServer or to look at the instructions on wiki.debian.org/BOINC, of which I am unsure about how well this adapts to Ubuntu.

Is there a way to use mysql client binary tool without installing to connect to another mysql server?

Here is the situation, I have access to some servers and don't have the root privilege to install mysql-client using 'yum', so I'm wondering maybe I can find some binary tool downloaded directly from internet to connect to another mysql server. I googled it, but failed. Does anybody know where I can find such thing? or some other solutions to my question?
The standard mysql client command line utility can be used in any Linux machine to connect to a MySQL Server anywhere if you have connectivity to TCP port 3306.
From http://dev.mysql.com/downloads/mysql/, download MySQL Server, Linux, Generic, 64 bit (or 32 bit) TAR Archive. Un-tar it, and look for the program file called mysql in the directory bin/. That's the command line client. It doesn't need to be installed, just copy that file into your oath or run it from the current direcrory.

Where can I find MySql 4.0.30 for windows?

I need to adapt our testing server to our production one that is stored on Aruba.
Aruba use MySql 4.0.30 but I can't find them nowhere!
Anybody know where can I find it ? or anybody has the installer stored anywhere?
Davide
According to http://lists.mysql.com/mysql/210800 (an email from a MySQL employee) this is a non-public release for customers who are too inflexible to upgrade. It says you can pay for "extended support" to get it.
Here for you source: http://mirror.provenscaling.com/mysql/community/source/4.0/mysql-4.0.30.tar.gz
Binaries only there for 4.1: http://mirror.provenscaling.com/mysql/community/binaries/4.1/
MySQL does not require much installation steps like most windows software.
Just copy the mysql dir and the mysql data dir from the production environment to your local machine and start mysqld.exe (does not need to be run as a service) from the bin directory with:
mysqld.exe --defaults-file="C:\path\to\my.ini" MySQL
If it does not start, you most likely tweak some path entries in your my.ini.
Or you can install the latest 4.x Server you find and replace the binaries and data files with the ones you get from production. That should totally do it.

Where do I find the MysqlDumpSlow command?

Hi I'm logging slow queries because we're having some performance
issues and I have read about mysqldumpslow and thought that would be a good
way to sort through the queries.
At the command prompt, I type mysqldumpslow and I get this:
'mysqldumpslow' is not recognized as
an internal or external command,
operable program or batch file.
I'm using MySQL version 5.0.79 on Windows Vista.
Note:
c:\Program Files\MySQL\MySQL Server 5.0\bin is my path and I have searched the drive for 'mysqldumpslow' and can not find it.
What am I doing wrong?
Note:
MySql 5.0.x does support the mysqldumpslow command follow this link to manual
edit : oops, I read the manual wrong, and gave wrong information :-( sorry :-( let's give it another try...
I've just installed MySQL on windows, to try using mysqldumpslow, and I don't have mysqldumpslow installed either :-( So, you are not alone, and it doesn't seem to be a problem with your install (I've tried 5.1.x, but as you highlighted, it should be the same for 5.0.x)
Looking at the "mysqldumpslow" I have under Linux, it appears it is a Perl script ; and Perl is not often installed on a Windows machine. Maybe that would be a hint to a solution...
Well, after a bit more testing, when installing MySQL, it seems you have to select "Developpers Components > Scripts, examples", which is not installed by default (at least on windows) -- no need to reinstall everything : you can "modify" the installation, to add this option.
Then, you will have a "script" directory next to the "bin" one.
For instance, on your install, it should be something like "c:\Program Files\MySQL\MySQL Server 5.0\scripts".
In this directory, there are some scripts ; one of them is mysqldumpslow.pl ; which is what you are looking for ;-)
Now, you "just" have to get Perl installed and running on your machine (sorry, I've never installed Perl on windows ; but you can find some informations here)
Hope this helps better than what I posted before !
try typing
whereis mysqldumpslow
If that still says its not installed,
EDIT: Above is not relevant, as on windows. Missed that, thanks to commenter for pointing it out.
I always use mysqlsla (mysql slow log analyser) ahead of mysqldumpslow - you could give that a go.
http://hackmysql.com/mysqlsla
Mysqldumpslow is a Perl script so under Windows you will need to make
sure you have Perl installed and will need to explicitly invoke it via
Perl.
The way the script is set up it will work automatically under Unix
because Unix has the ability to run scripts directly by identifying the
correct script processor from the first line of the script. Of course
you still need Perl installed, but that is taken for granted in most
Unix installations.
Or you can also try to set the path in Windows environment variables.