I'd like to set up a Mysql database online. I've been trying to find information on this online, but I haven't been able to find a good summary of the whole process. I have very limited experience with webhosting in general, so would really appreciate any pointers.
My questions would be:
- do you needed a dedicated mysql server online, or can I just set one up on my webspace (I have a website that I use for random stuff)
- how do I go about setting up a database on my webspace (if possible)
So far I've uploaded phpMyAdmin to my site, and the start screen loads fine, but I'm stumped for user and password. Do I need to enter my webspace ftp user and password here? Or my mysql user and password (which I'd find weird since I have not actually set up any mysql webspace yet). Or do I need to configure phpMyAdmin for a specific user and password?
So yeah, very basic stuff really... :)
Thanks!
Dave
Related
I'm trying to set up a automated system in our lab of archiving metadata information for some next-generation data.
Essentially I want to be able to send a Google Form link to my colleagues, have them enter their data, and when they click submit, have it automatically update a local MySQL database that is running on our main lab computer, so that we can query any information regarding samples we may need later on.
I've a few days trying to figure this out, and haven't really gotten anywhere. The main problems are these: I know you can JBDC Class to do this. However, I am not entirely (or at all) familiar with how a Google Apps Scripts code is supposed to be run, and I am having trouble connecting to our MySQL host (which I am also not familiar with). It's apparent that because I am running a localhost, I cannot actually use JBDC to connect to it, and I had no luck when I tried to grant all connections access to MySQL server by following the answers on this topic (How to grant remote access permissions to mysql server for user?).
I'm kind of at a loss, and it may just be that I simply don't have the knowledge to accomplish what I'd like to do. Can anyone suggest any step by step tutorials, youtube videos, or offer some advice?
Thanks.
EDIT: Post's i've already gone through:
Post Google Forms to a MySQL database?
Google Form output to remote MySQL database
https://developers.google.com/apps-script/guides/jdbc
SO guys, we had legacy website that has a 12GB MySQL database. We decided to port the legacy website to WordPress and need to import the database into PHPmyAdmin without breaking the database and to implement this in the shortest possible time (although time is not such a critical matter if this can be done painlessly but correctly). So would appreciate if someone can guide me in the right direction and provide detailed instructions.
Thanks guys.
I dont know much but i can recommend to back up you're files befored doing any transfers. If you have a fast internet speed then you guys can try to download the SQL database as a compressed file and dump it into the wordpress new database. The database for mysql should be in your cpanel folder (since all cpanel folders/designs are different it would be best to look up "where to find the msql database on hosting company name's cpanel" and once you find it then you can transfer it whereever is possible)
This is the easiest and most correct way.
mysql -u username -p "dbname" < "path/to/bigdata.sql"
If you have FTP/SSH access, then this is the most probable way.
Upload your .sql via FTP
If you have access to CLI , just run the command above
Normally , this will be fast, but since its 12GB, it might take 30min-1hour depending on server resources.
You can also use other options like this one .
I've already experienced importing 61GB before with just this one-liner.
I installed php and mysql on my IIS 7,
Now, I can see the phpinfo() and it all works great, except, I dont know where and what are the connection string details are for mysql.
I am trying to install wordpress (via web platform installer on IIS) and everytime I try to install it, it asks for database details - I understand why its doing that, except, I dont know what they are myself.
After a lot of googling and searching, I am surprised that there are literally NO information on how to do this, no tutorials anywhere, not even bugs on this. Either that, or I'm barking up a different solar system.
Any links to tutorials on how to do this would be very helpful. But most importantly, how do I find the details about mysql?
thanks.
Do yourself a favor and download a proper GUI for working with MySQL, such as SQLYog or something similar and forget that poo of PHPMyAdmin. As mentioned, your username is most likely root without password.
You can search for a program called mysqlinstanceconfig.exe (or something similar, you should have it in your MySQL installation folder) - it allows you to quickly reconfigure your instance and you can reset your login credidentials with it.
About MySQL GUI-s: if I'm not mistaken, there's one free coming directly from MySQL but I'm not sure about that. Forget about PHPMyAdmin, it's the worst piece of code ever written and a HUGE security hole.
As you're running a MySQL server locally, your hostname would be localhost, and you can use root as the username, and put nothing as the password.
My question is whether or not it is possible to allow DB connections ONLY from a certain domain. I suppose this could be done by checking the referral URL, but I was curious if there is an easier way.
The reason I am asking this is because I had a thought of someone randomly searching for the config.php file on my server and, if they found out, would simply be able to include it and run mysql queries at will. This is definitely something I would not want.
Is it better to just hide the config file in an unusual place?
Thanks in advance,
Phil
First of all, your config.php should not be publicly accessible from the web. Your Web Server should be able to include the file, when needed, but the file itself should never be served up in your web server. With the correct configuration, you shouldn't have to worry about someone "finding" your config.php via a browser.
Also, on the database side, you should setup your database so that it only accepts connections from your web server(s). It should not be publicly accessible to anyone on the internet.
If someone is already on your web server that shouldn't be there, you probably have bigger issues. This might be unavoidable in some shared hosting scenarios, but if that's a concern, get a private server or a hosting provider that will correctly set up permissions for you.
If they are inside the system and can see your files, the chances of you doing much to protect your DB are pretty slim. As for blocking other IPs connecting, you can specifically allow hosts to a DB.
I suppose this could be done by checking the referral URL, but I was curious if there is an easier way.
No. Referer is an HTTP concept, it has no meaning once you get to the database level.
The reason I am asking this is because I had a thought of someone randomly searching for the config.php file on my server
The config file should not be directly accessible over HTTP, and even if it was, it should be executed before being served. So it shouldn't be possible to get to the database credentials remotely.
If you are concerned about other people on the same shared hosting, then your file system permissions should prevent access.
I would control access with my user table. For ex: MYSQL 5.5 has a mysql.user table with username, password, hostname, and privileges. If you were to set 'hostname' of each user to the specific domain,
ie. 'update mysql.user set hostname = 'somedomain.com' where user = 'root' and hostname = '127.0.0.1';, the root user would only be able to login from that domain (unless there were multiple entries for the root user in the user table, which there are.) Of course, if you are using only one account for your database access across your application / website, this will not work.
I've inherited development for a website on vps hosting, and have login info for a user with sudo privileges, but don't have the password for the mysql root user. After digging around a little, it looks like the only way to fix this is to stop mysql (something like this: http://waoewaoe.wordpress.com/2010/02/03/recover-reset-mysql-root-password/). But because the website it's serving is currently in production, I'm hoping you guys can enlighten me to any potential consequences (or let me know if there's typically a file where the password would be accessible).
a) during the time mysql is stopped, information in the database won't be accessible, right -- even by other users?
b) will resetting the root password have any impact on other users after mysql has restarted? Will their username/passwords still be valid? The current application is using an account with limited privileges to read/write to the database, and while 5min downtime in the middle of the night would probably go unnoticed, half a day while I tie up loose ends/figure out what I screwed up will land in me hot water.
Thanks in advance for your help!
You can look after back-up scripts and cron jobs. Maybe some script does a dump using the root account. If this is the case the password needs to be stored in cleartext. You can also look at configuration files of application that use the database.
You also need to be lucky. If you are not, you have to stop mysql, change the password and start it again.