?
Solved

mysql db setup problem with CrystalTech web host

Posted on 2007-11-19
7
Medium Priority
?
414 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

719 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