Is a portable version of MySQL for Linux available? - mysql

Is a portable version of MySQL for Linux available?

You don't need to "install" mysql. Its binaries will run from any directory (given appropriate search paths etc), and its configuration can be specified entirely on the command-line, if necessary, bypassing the likes of /etc/my.cnf, or by specifying an alternative config file with arbitrary path.
Some engines can work with a readonly data directory (MyISAM, Archive), others may require a read/write data directory (Innodb) but that could be a temporary area or ramdisc.
There's nothing "un-portable" about MySQL.

To have a Portable Version of MySQL in linux, you can compile it to a Generic location
./configure --prefix=/myworkspace/installs/mysql --exec-prefix=/myworkspace/installs/mysql
Then usual
make
make install
this will install mysql on /myworkspace/installs/mysql. Then you can zip the whole mysql folder and can take it anywhere except you can run it from the same directory structure you have installed. Compiling mysql requires some dependencies, check it out here http://dev.mysql.com/doc/refman/5.6/en/source-installation.html .
If you install these dependencies also in /myworkspace/installs/mysqldepends/ , then your mysql is totally portable.

MySQL Embedded Server is available for purchase.

I advice you to use SQLite

Related

how to get most recent mySQLdump tool

Perhaps not really a suitable SO question but I'll give it a try.
When I try to dump my DB from the remote server, my MySQL workbench for MacOS tells me:
Applications/MySQLWorkbench.app/Contents/MacOS/mysqldump is version 5.7.12, but the MySQL Server to be dumped has version 5.7.15.
Because the version of mysqldump is older than the server, some features may not be backed up properly.
It is recommended you upgrade your local MySQL client programs, including mysqldump, to a version equal to or newer than that of the target server.
The path to the dump tool must then be set in Preferences -> Administrator -> Path to mysqldump Tool:
I have version 6.3 installed, and the built-in "check for updates" only tells me I already have the latest version.
Does anyone know where I can go to download this more recent dump tool? I looked around on the MySQL.com but couldn't find it.
There's a simple way to solve your problem.
Just go on google type: mysqldump 5.7.20 (this number is the version are you looking for, in my case is 5.7.20)
choose the link site from https://dev.mysql.com/downloads/mysql/
on that page scroll down until you see a list of avaible downloads, choose your operating system (in my case is Windows) then... download the zip that has the version you are looking for.
unzip that folder... go to bin inside it... from there copy mysqldump and paste it into your MySQLWorkbench folder... (replacing the one is in there)
restart your MySQLWorkbench... and that is all.
You just need to update the mysqldump.exe.The up to date version of the exe can be found in. To solve the issue just go to Edit->Preferences->Administrator ,and browse the following path
for example C:\Program Files\MySQL\MySQL Workbench CE 5.2.47\mysqldump.exe
If for some reason you have two separate installations of the SQL server, you might be pointing to the wrong sqldump.

Install mySQL on Redhat specifying a different location

I need to put the datafiles for mySQL 5.5 community server on a different location than the default (it would be helpful if the log could go there too). Is this something I can do at the command line or after install.
This is on Redhat
It looks the only way to do this is by building from source and specifying the home during Make. I would put down instructions but I am having a devil of a time getting it to build.

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.

MySql portable version

anyone know a portable version of mysql?
I know xampp but it comes with PHP and Apache together
anyone know how to isolate the mysql?
You can download the MySQL Essentials version and make a few small changes to directories in the my.ini file to use relative paths instead of absolute paths. Then you can run the server directly without having to install or use a Windows service.
Download a MySQL .zip file (instead of an .msi, though you could get the .msi and use 7Zip or Orca to extract the files from it).
Extract the files. At a minimum you need the bin and share directories (actually, in bin, you really only need mysqld.exe as the absolute minimum to run a server).
Edit my.ini to change the basedir and datadir paths to something relative. For example:
basedir=".."
datadir="/MySQLdb"
If you do not have an existing database, then create one:
mysqld --bootstrap
Run the server (you may need to use the --skip-grant-tables switch to get it running until you have set up your MySQL user):
mysqld
To avoid the server being run in the current command-prompt, you can use the following to have it run in its own console which should disappear once it is running:
start mysqld
If you get errors, delete the log files (e.g., logs\ib_logfile*) and run it again.
I think not, without counting on XAMPP. You don't have to use PHP or Apache anyway, just run the mysql from the .exe's
Created a portable configuration at https://sourceforge.net/projects/mysql-server-portable/
You should put your my.cnf or my.ini in a different directory than your data directory.
You will then need to initialize your portable version,
"\mysql-5.7.30-winx64\bin\mysqld" --defaults-file="\mysql-5.7.30-winx64\config\my.ini" --standalone --explicit_defaults_for_timestamp --initialize
then you can start your portable version,
"\mysql-5.7.30-winx64\bin\mysqld" --defaults-file="\mysql-5.7.30-winx64\config\my.ini" --standalone --explicit_defaults_for_timestamp

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.