Uploading small .sql file to MySQL database file returns error (XAMPP on OS X) - mysql

I am running a fresh install of XAMPP 1.8.2 for OSX and am currently trying to upload an exported database that is 171kb in size.
Getting hit with this error
Warning: File upload error - unable to create a temporary file in Unknown on line 0
From what I have discovered it may have something to do with write permissions to a /tmp file which doesn't seem to exist on my system.
Trying to set this up so I can make changes locally on a clients website without breaking the live site.
Cheers and thanks for taking a look.

Solved
within the file uploads section of your php.ini there resides this:
;upload_tmp_dir =
To allow for uploads uncomment and give the tmp dir a home:
upload_tmp_dir = "/tmp"
The the most recent default installation of XAMPP on Lion has a couple of very important lines commented out (in regards to phpmyadmin/mysql). Not sure why, but I would love to learn the reasoning behind it.

Related

XAMPP MAC OSx - use external USB drive for MySQL storage

I'm using fairly large MySQL DB Tables with XAMPP, which makes it tough with my rather small internal storage of my Mac. I thought I would just keep MySQL data on an external USB3.0 SSD drive, but it looks like it's not that easy.
Here is what I've tried:
With XAMPP ( not VM ): Moved /Applications/XAMPP/xamppfiles/var/mysql to /Volumes/myexternalssd/mysql and then pointed everything in my.cnf to that dir. The permissions seem to have copied properly. But it didn't work. MySQL does not start at all if I trash the original dir, or just keeps using the original dir if I leave it in place.
With XAMPP-VM: Moving ~/.bitnami dir to the ext drive and then symlinling ( ln -s ) to the new location. The error is then:
Cannot load stack definitions.
Dtails:
1 error occurred:
* failed to create stack: cannot deserialize stack from file "/Users/arseni/.bitnami/stackman/machines/xampp/metadata.json": open /Users/arseni/.bitnami/stackman/machines/xampp/metadata.json: operation not permitted

windows could not start the MySQL. service on local computer. Error 2 : The system cannot find the file specified

I am not able to start the MySQL server on my Windows system. When I tried in services.msc to run, I got this error:
Starting it through the XAMPP control panel does not work either:
Can you help me to solve this?
Open windows services (Start->run ->Services.MSC)
Find service with name "Mysql Server" and check path, it should be something like that:
"C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL51\bin\mysqld.exe" "--defaults-file=C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL\Data\my.ini" MySQL
Make sure that Mysql folder and executable file mentioned above exist by this path.
OR
Sometimes the file name of mysqld-nt.exe renamed to mysqld-nt.exe~ so rename it back to its original name and this may solve the problem.
Go to the path: C:Programs Files\MariaDB 10.2\data..
Lookout for my.ini file. Open the file and check the path for "datadir".
If that does not match to your installed directory then update it.
Your problem will be solved for sure.
I faced the same problem and solved it.
Just modify the registry editor value.
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MySQL/ImagePath

How can I recover MediaWiki pages from an old MAMP install?

I have a three year old or so MAMP install (a copy of the application folder and all its contents, databases, etc.) with a three year old MediWiki (version 1.19) installed on it, several pages, and a few images. I would like to know how I can access those pages (or at least the content on them) and import them or copy them over to a fresh install I made today with the latest versions of MAMP and MediaWiki.
I already tried copying the database folder (MAMP/db/mysql/my_database; contains .frm files) from the old install to the same location in the new install but it doesn't seem to have changed anything. I even looked at the contents of the tables with phpMyAdmin but I didn't find any of the old content. Where do I go from here?
I installed MAMP on my MacBook Pro running OSX Yosemite. I'm hosting locally (e.g. using localhost). I am able to install a fresh MediaWiki on my localhost MAMP server and it works fine (there's just no content).
UPDATE: After seeing this I changed $wgMainCacheType = CACHE_ACCEL to $wgMainCacheType = CACHE_ANYTHING in the MediaWiki local settings file and now I get an error page that looks like this:
Do I need to somehow upgrade my databases? They are old after all. How should I go about doing this?
Shutdown mysql
Just copying the MAMP/db/mysql/my_database is not enough
Copy the contents of your db folder and below to the new
MAMP db folder
Note i assume your new MAMP is pretty virgin
Poached it from here :
http://joejoomla.com/sound-off/157-how-to-upgrade-mamp.html
Start new mysql
Will incl necessary config files
It is not as if you should have expected MAMP to recurse directories
It needs config files from old and you don't have them yet
I have never done it on MAMP
Edit:
Concerning warning that resulted
Make sure that XCache is installed with the new version of PHP. The most likely cause is the new version of PHP simply doesn't have xcache installed. You can do this by creating a php file with just the code
<?php phpinfo(); ?>
and then viewing it in a web browser.
Setting $wgMainCacheType = CACHE_NONE; will disable all caching, which would prevent the error, but make things slow.
From: http://m.mediawiki.org/wiki/Thread:Project:Support_desk/%22CACHE_ACCEL_requested_but_no_suitable_object_cache_is_present.%22
Advice : for this kind of software, use a Virtual Machine, it will save your time : my own mediawiki is running for 8 years under debian, hosted on a several different Apple machines.
But for now, if you still have the former stack running :
0 . (always) save your database content + files
for the database :
https://www.youtube.com/watch?v=NnOE0KWHGkY
for the files :
tar cfvz my-old-mediawiki.tar.gz path-to-mediawiki-directory
This will allow you to rollback if something goes wrong
Export your content and history
go to the special page : "Export pages", list your pages.
if needed, use the special page : "List all pages".
this will produce an xml file.
Save your images somewhere on your file system
use the special page : "List all files".
you now have exported your pages and files
3) Switch stack
check that the new virgin mediawiki is working well
import your pages
go to the special page : "import pages", upload the xml file produced in step 1
you now have a similar wiki, minus the files
import your images :
after the step 4, each file page has been created without its content.
you can upload manually each image exported at step 2) if you have only some of them,
if that is too much files (>30), you can use this procedure : https://www.mediawiki.org/wiki/Manual:ImportImages.php
keep in mind also to reinstall any extensions installed previously.

Fatal Error when accessing /index.php/Special:Specialpages MediaWiki page

I recently upgraded our MediaWiki installation to version 1.24.2
Now when I access the Special pages at http://www.myserver.com/index.php/Special:Specialpages I get this error:
Warning: require(/www/local/path/to/web_directory/public_html/includes/specials/SpecialAllPages.php) [function.require]: failed to open stream: No such file or directory in /www/local/path/to/web_directory/public_html/includes/AutoLoader.php on line 1282
Fatal error: require() [function.require]: Failed opening required '/www/local/path/to/web_directory/public_html/includes/specials/SpecialAllPages.php' (include_path='.:/usr/local/share/pear') in /www/local/path/to/web_directory/public_html/includes/AutoLoader.php on line 1282
Can someone please point me at the right direction to solve this problem?
I have already searched the entire interweb for an answer...
PHP version: 5.3.10
MySQL version: 5.5.31
Apache version: 2.2.22
It seems there was an error while upgrading/transferring the files to your server.
It seems you solved your problem by yourself, however: You shouldn't update mediawiki's files on top of another version. Instead, you should delete the old installation (keeping the files you need like LocalSettings.php, images/ and so on) and upload a new copy of the new version you want to use. See https://www.mediawiki.org/wiki/Manual:Upgrading for a detailed upgrading tutorial. Following these steps should avoid such problems the next time :)
I found out what the problem was.
I installed v 1.24.2 on top of version 1.21
By some reason the file SpecialAllPages.php was named SpecialAllpages.php with a small 'p'.
After renaming the file to SpecialAllPages.php the same error was triggered regarding the file SpecialAllMessages.php that was named SpecialAllmessages.php
After renaming that file also, everything works fine again.

In ''mysql'' Manager of pid file quit without update file

I am in a serious problem while installing mysql on ubuntu 12.04 32 bit. when i start mysql with command ''./mysql.server start'' I got this error Manager of pid file quit without updating pid file. I installed ''mysql-5.1.39-linux-i686-glibc23''.
I thoroughly search for the solution to fix this error but cannot resolve it yet. I copied my-medium.cnf file to the /etc directory and rename it by my.cnf also edited this file in the section ''The mysql Server'' and add these lines ''datadir = /exports/disk0/data'' but could fix this problem. Can any one help on this.
The message bout the pid file is kind of a red herring. It just means that the init script /etc/init.d/mysql did not return success. The root cause could be a variety of things, for example file permissions problems in your datadir, or the config file contained an invalid line, or dozens of other possible problems.
When you get the error about the pid file, the first thing you should do is to go read the MySQL error log file. Usually this is in the data directory, and it may be called hostname.err (where "hostname" is the name of the server you installed MySQL).
Search the file for any lines reporting "ERROR" and then use Google to research the error.