SQlite to MySQL migration for Seafile Server - mysql

I have successfully got Seafile Server fully working with HTTPS.
However I'm trying to migrate from SQLite to MySQL and everytime I try, the seafile server stops working.
I'm not sure what information to put here that yous will need but happy to provide what ever you need.
I followed this guide Deploy Seafile Windows Server With MySQL
Its really frustrating, I dont understand why its not working. I also installed MySQL Workbench and I can see the seafile user with privileges and the databases populated with the tables.

Are there any messages in the logs?
Please look at the logs in /seafile/logs/
You will see an error message in seafile.log if you have problems with MySQL.
For example:
../common/seaf-db.c(123): Failed to get database connection:
Failed to connect to MySQL: Can't connect to MySQL server on '127.0.0.1' (107).
http-server.c(761): DB error when check repo existence.
Disconnected from daemon
I have done such migration already and it did work without problems.

Related

Cannot log into MySQL workbench server - unknown database

After dropping a schema in MySQL workbench and attempting to re-create it (a process I have done many imes, it is just an easy way to clear out the database so that hibernate can recreate it), I suddenly got this error for the first time and now I cannot do anything with MySQL workbench. Any help?
Cannot Connect to Database Server Your connection attempt failed for
user 'root' to the MySQL server at localhost:3306: Unknown database
'bookstore'
It then makes me check that MySQL is running on localhost, port 3306, user root has rights, password is correct, etc. This is all correct. I know the database is unknown because I dropped it, but I am not sure why that is causing an issue now when all I want is to be able to log in to the server. I tested the connection via settings for the server connection and it is actually able to connect fine. I have done this before many times with no issues.
Any help would be greatly appreciated.

MySql Workbench, Can't connect to MySQL server on 'localhost' (10061) (2003)

This might seem like a duplicate but trust me its not
So you guys are probably familiar with the error. The server doesnt start at the beginning and when i try to start it from Startup/Shutdown it gives this error.
Most of the people with this problem fixed it by starting MySQL server manually. Yeah but problem is mine was already working, i mean the server is on both in services and task manager. But for some reason im getting this error.
So my question is, how can i fix this?
- Checking server status...
- Trying to connect to MySQL...
- Can't connect to MySQL server on 'localhost' (10061) (2003)
- Assuming server is not running
Tried finding some logs but all says the same as above
Oh and i tried shutting the server down and opening again
Do you guys think that it might be happening because it is conflicting with some other sql program? I uninstalled everything related to sql but i might miss some stuff.
Programs i used to have are
-XAMP
-SQL Manager
-Microsoft SQL Server
-Microsoft SQL Server Management Studio
Like I said though, i uninstalled them all.
You need to check for all the mysql configuration files in /etc/mysql and check for any lines containing 127.0.0.1 and bound address or skip network and comment them.
Hope it helps.
It seems like for some reason it was having a conflict with other connection or port was just wrong on set up. I tried deleting all the connections i have and started a fresh one and it worked. Weird right? Here i was thinking when you uninstall MySQL, it woudl delete all the connections too.

Cannot connect to MySQL Server database at localhost:3306

When I first set up MySQL Server in Netbeans everything worked well. Now one day I think I accidentally clicked something or my computer lost battery life when I was connected to MySQL Server, and after these event(s) I have not been able to connect to MySQL Server. I do not know for sure if either of the above events would have any effect on connecting to a MySQL Server database.
Anyway since these events I have found that I cannot "start" or "connect" to a MySQL Server databse. I am doing this all through Netbeans IDE.
Here is a picture of how I try to connect to my databaseL:
This is what the error message says after I click connect:
Unable to connect. Cannot establish a connection to jdbc:mysql://localhost:3306/twitterdata using com.mysql.jdbc.Driver(Unknown database 'twitterdata'). The name of the database I am trying to connect to is twitterdata
How can I get reconnected to the MySQL Server database "twitterdata"?
I am not familiar with MySQL, databases, servers and I have no idea how to get reconnected. If there is any other helpful information that I should provide let me know.
What MySQL tools can I run to find my problem?
Why would the error message tell me that the database is unknown?
If I got to C:\ProgramData\MySQL\MySQL Server 5.5\data. There is a folder named twitterdata.
Here are the contents of that directory:
Please let me know if you need more information or if you have other suggestions that would help!
Thanks for all the help!
If you are using windows system and facing the error 'unable to connect localhost 3306' at the connection time. First you have to need start MySQL services in 2 steps:
Press "Windows key + R" write "services.msc"
And run as admin start MySQL service.
There can be three issues:
1) Either your server isn't even running. Open your command prompt and enter mysql
2)Let's say it is , can you check if it's connecting on the correct port.
Like in the url, you are using 3306,
Try following this post:
How do I find out my MySQL URL, host, port and username?
3) Can you check what if there are any credentials to the database you are connecting?
https://netbeans.org/kb/docs/ide/install-and-configure-mysql-server.html

Failed to connect to MySQL at 127.0.0.1 in MySQL Workbench. System error 61

I'm running into a little trouble with MySQL Workbench.
This is the situation, I'm developing a database to query it remotely from Android devices. This is the first time I use MySQL Workbench, so I've followed this tutorial:
http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/
I have no problem creating the EER diagram and generating the SQL script. The problem comes when I try to connect to a MySQL server. I get this error:
"Failed to Connect to MySQL at 127.0.0.1:3306 with user root. Lost connection to MySQL server at 'reading initial communication packet', system error: 61"
http://img101.imageshack.us/i/capturadepantalla201104i.png/ (if the link stops working tell me)
I've also tried using the Local Socket/Pipe connection method with the MAMP Socket in '/Applications/MAMP/tmp/mysql/mysql.sock', but it gives the same error. And I've also tried using MAMP port 8889 but still nothing.
So anyone knows how to fix it? And another question, can I connect from my Android device to my laptop(where the database is placed) without using MAMP? MySQL needs MAMP to serve queries? And the last thing, am I going into the right way? Or should I do it other way?
Thanks for reading.
I had the same issue, but part of your question is what fixed it for me:
Set connection = Local Socket/Pipe
Set socket path = "/Applications/MAMP/tmp/mysql/mysql.sock" (for me - I got the path from my MySQL log upon initialisation)
Running: MBP, OSX 10.8.3 (Mountain Lion), MAMP Pro
Can't really fathom any further what your issue may be, but perhaps double check your DB is properly initialised. But, perhaps this helps someone else :)
I typed: sudo /usr/local/mysql/support-files/mysql.server start
into the terminal and it started the MySQL server successfully and I was able to connect to MYSQL workbench.
You need to sure that Mysql process is running in your system. not sure in MAC but in windows it'called mysqld.exe
well take a look
http://lists.mysql.com/mysql/124371
Most commonly happens when database/server is not running. You need to check your server, or restart it. You can do so if you have mysql workbench under server administration. Check your manual for restarting or starting the server.
On osx 10.6 using mamp pro I solved this by allowing network access in the MySQL tab from the home window. Hope it saves someone the pain too
When trying to use the MySQL Workbench and connect through an SSH tunnel, you will get this error when your SSH connection does not complete successfully (e.g. improper host, password, key file, etc)
A good way to trouble shoot this is to separately test the the ssh connection from the machine you are trying to connect from and establish that you can do so successfully.
Try closing MySQL and running it as the admin. This worked for me.
After making above improvement such as checking if mysql service is running or not, you just need to give a small password while creating connection, it is ' ' or 1 time press on space-bar in case of GUI or workbench.
After which you just need to validate your machine with server (validated HOST).
For that purpose click on 'New Server Instance' and it will configure server/HOST on your behalf itself.
I have done this successfully just a few couple of minutes ago. My workbench software is able to show all pre-installed databases etc now.
Thanks!!!
I solved it! On a mac just go to spotlight search on the top right of the screen and type Mysql. Turn it on.

Can't connect to database

Actually I'm having more than one problem...but all of it has to do with connecting or working with the MySQL database...First you can see one of the errors on my website and no matter what you choose it seems to just say it can't connect to the database...I've configured a configure.php file to allow files to connect to the MySQL database...see the website here:
http://netsurfer123.byethost11.com/index.php
Then when I try to log-in to the Admin area of my MySQL database it just says:
phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
Please let me know what I can do to correct these errors...and thanks very much in advanced for any helpful response/s.
First you need to check if the MySQL server is actually running. Use a command such as
/etc/rc.d/init.d/mysqld status
Or similar for your system if possible.
Did you check the web server log file? Does it contain errors as indicated by phpMyAdmin?
Your site is simply unable to connect to the database to which it's trying to connect. This could be for any number of potential reasons:
Is the database running?
Is the database accessible by that machine? (Maybe there's a firewall in between the two servers, if they're separated?)
If the database is on that same machine, are you connecting to it properly? (Maybe it allows only certain connection methods, such as a socket vs. the loopback address?)
Is your connection string correct? Maybe the login is failing?
Check your PHP logs, your Apache logs, your MySQL logs. One of them is complaining about something and it's probably trying to tell you what.