Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

mysql db setup problem with CrystalTech web host

Posted on 2007-11-19
7
Medium Priority
?
416 Views
Last Modified: 2013-12-13
I'm trying to help a friend set up  a free calendar app on their php account that's hosted with crystaltech.com. It looks like php is running on a windows server. The control panel allows creation of a database and the ability to specify users for that db.

The calendar app uses a sql file to create and populate the tables. I asked the host about phpmyadmin or anything else that would let me run this file. They told me I would need to install a standalone version of phpmyadmin on my local computer. This seems really absurd to me. I don't understand why good db interaction tools are not provided by default. It also looks like I would have to have a local linux box setup in order to do this (which i don't). So my questions are:

1. Is there a true standalone phpmyadmin option available that will run on windows (without having to install php and mysql)?

2. Should my friend just switch hosts?

3. Is there a different solution to this problem I don't know about?

Thanks.
0
Comment
Question by:sstahnke
  • 4
  • 3
7 Comments
 
LVL 21

Expert Comment

by:nizsmo
ID: 20313959
1. PHPMyadmin cannot run without PHP and MySQL, as it is firstly a tool to interact WITH mysql database and second is written in php

2. not sure, but what they are demanding is probably not usual..

3. can you clarify what you are trying to do with the .sql file? as you stated the calendar app uses the sql file to create and populate tables, why are you trying to "run" the sql file?
0
 

Author Comment

by:sstahnke
ID: 20314349
I don't use php very often so bear with me. i'm referring to the process in phpmyadmin where you select the appropriate db and then browse for a .sql file and then submit the form. This results in the sql code in the file being executed which creates and populates the necessary tables.
0
 
LVL 21

Expert Comment

by:nizsmo
ID: 20319081
and the host doesn't have PHPMyAdmin installed right?
I understand, so you are trying to import into the mysql database all the tables using the .sql file.
mysqldump may be another option, if you have access to the mysql commandline?
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

hope this helps.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:sstahnke
ID: 20320695
I'm fairly certain I don't have command line access. There was one "connection testing" area in the control panel but they don't allow you to use any of the sql commands you really need (CREATE, DELETE, ALTER, etc). It looks like all you can do there is run select statements.
0
 
LVL 21

Accepted Solution

by:
nizsmo earned 1000 total points
ID: 20323198
really??? that stinks, so to clarify you have asked them how to "import" the database and populate the tables from an sql file and they simply said get a standalone phpmyadmin?

Also do you have PHP access and can PHP connect to the database? if you can then maybe you can use PHP to execute the sql file (untested) like so:
(modify the settings accordingly)
$db = mysql_connect(....);
mysql_select_db(....);
 
$fp = fopen('somefile.sql', 'r');
while($fp != feof())
{
$line = fread($fp, 2048);
$line = mysql_real_escape_string($db, $line);
mysql_query($line);
}
fclose($fp);

Open in new window

0
 

Author Comment

by:sstahnke
ID: 20323312
that is what they said. I was kind of shocked. I should have php access. I'll try that.
thanks.
0
 
LVL 21

Expert Comment

by:nizsmo
ID: 20323340
MAY have to test and trial with that code, try with a smaller sql file first.
also i'm not sure if that code takes comments, as i said trial and error, otherwise think about changing hosts to someone who has phpmyadmin installed!

if you need to find a host, let me know i know a very good one.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn how to dynamically set the form action using jQuery.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question