Mamp Mysqldump

Posted on  by 



  1. Mamp Mysqldump Error

Using MAMP’s MySQL Server in Terminal #

MAMP is a free, local server environment that can be installed under macOS and Windows with just a few clicks. MAMP provides them with all the tools they need to run WordPress on their desktop PC for testing or development purposes, for example. You can even easily test your projects on mobile devices. Squisito is a third-party company which has planned to offer a common online platform for offering the best deals of online meals ordering. The Online platform will allow users to register and maintain an online profile on the Squisito Website, Registered users can view and order a curated collection of meals from different restaurants. Sep 22, 2017 If you are using MAMP for your local WordPress or PHP development on a Mac, you likely need to import huge MySQL database dump files (more then 32Mb) in your local environment. You could increase the size of maximum uploads in your php.ini file, however if the dump is really big (over 100Mb), the operation can take ages to complete.

When installing Craft on the command line, your terminal session needs to use MAMP’s MySQL server. Edit the .bash_profile file from the previous section and add MAMP’s MySQL path:

First I detected the path of mysqldump with the following command: locate mysqldump This gave me: /Applications/MAMP/Library/bin/mysqldump. Now, I can simply call /Applications/MAMP/Library/bin/mysqldump instead of just mysqldump in Terminal. Aug 19, 2014 Now that mysql is recognized in the Windows command prompt, you can run the MySQL commands listed below to dump and restore your databases. To dump/export a MySQL database, execute the following command in the Windows command prompt: mysqldump -u username -p dbname filename.sql. After entering that command you will be prompted for your password.

Now terminal will look for mysql in MAMP’s bin directory first. You can also run mysql and mysqldump commands on MAMP’s database when you need to. Close your terminal session and open a new one. Don’t forget start MAMP’s MySQL server if it’s not already running.

Mysqldump

Set Important php.ini Values #

MAMP runs slowly compared to production servers, so it needs extra time to do things. It also needs plenty of memory allocated to PHP. Edit the php.ini file for the version of PHP your Craft site is running. Go to File > Edit > Edit Template > PHP (php.ini) and select the version of PHP you’re using.

  • Find max_execution_time and set it to 60 or higher
  • Find memory_limit and set it to 256M or higher
  • Save and close the file
  • Restart MAMP

Be kind to yourself and do that for all of MAMP’s PHP versions. Do use MAMP’s own php.ini editor. If you’re tempted to find and edit the correct php.ini in the file system on your own… good luck.

Should the code to load the data in that example not be:

createMySQLXMLDataSetinstead ofcreateXMLDataSet

seeing as you are trying to load a mysql dump file?

I get the following errorPHPUnit_Extensions_Database_Exception: The root element of an xml data set file must be called <dataset>

Although if I do change it to createMySQLXMLDataSet I get this errorArgument 1 passed to PHPUnit_Extensions_Database_DataSet_DefaultTableIterator::__construct() must be of the type array, null given, called in /Applications/MAMP/htdocs/3XM/vendor/phpunit/dbunit/src/Extensions/Database/DataSet/AbstractXmlDataSet.php on line 106 and defined

does your xml have the following line?<database name='cfp_test'>

can you share your code somewhere like gethub or upload to a workspace you can snapshot?

Sunflower audio mac download. This is my load code:

This is my data file:

This is my full page code:

When I use the following load code:

with this data file

it works perfectly.

I'm running the test withvendor/bin/phpunit tests/db_test.php

But I need it to work with mysql dumps from phpmyadmin.

I hope you can help me out!

Thanks

Al

not sure how you created your xml dump from mysql. I used

which created the following file which seemed to work

I'm using phpmyadmin to export the file as a cvs. I don't have terminal access to the server.That seems to be the issue - they both return different files.

v

I'll write something to convert the phpmyadmin export to the correct format.

Thanks for your help

Al

Mamp Mysqldump Error

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.





Coments are closed