Help - Search - Members - Calendar
Full Version: Mysql Database Management
Zymic Webmaster Forums > Zymic Free Web Hosting > Tutorials
Pages: 1, 2
Bread
Zymichost MySQL database management

If you require a database for an application, this is the guide for you.

In your control panel, first navigate to the 'MySQL Database Management' page:



On this page you will be presented with a series of form fields.

The first field to fill in is the one adjacent to the button labelled 'Create Database Name'.
Enter in this field a name for your database, as shown in figure 1.1:

figure 1.1


Click the button labelled 'Create Database Name'.
Providing all has gone smoothly you should be presented with the following notification:



Now before you can access this database you need to add a user to it, this is done with the form below the database creation one.
Fill in a username and a password as shown in figure 1.2:

figure 1.2


Click the button labelled 'Create Username', if all is okay you will again be presented
with the following notification:



If something is incorrect you won't be presented with this screen, so make sure you see this notification.

Now below this form is another form, situated on which are two drop down menus, they should now be populated with the user you just created in the first drop down and the database you just created in the second.

Make sure the user you created and the database to which you wish to assign privileges to are selected, once done check the checkboxes as shown in figure 1.3:

figure 1.3


If you're not sure what privileges your application requires, then check all the boxes. If you do, feel free to fine tune it.

Again, providing all has gone smoothly you will be presented with the following notification:



Removing databases, users and revoking user privileges

If at any point you wish to revoke the user's permissions and assign a new set, simple check the check box in the 'revoke' column as show in figure 2.1:

figure 2.1


Then click the button labelled 'Revoke'. Once done you can reassign the privileges.

n.b: This does not delete the user, it merely removes access for that specified user to the database.

If you wish to delete a user, select the username from the drop down and click the button labelled 'Delete' as shown in figure 2.2:

figure 2.2


To delete a database follow much the same instructions but select it from the 'Database Name' dropdown as shown in figure 2.3:

figure 2.3


That is the database creation completed, now a few simple examples of how to connect:

MySQL driver
CODE
<?php
define('DB_HOST', 'localhost');
define('DB_USER', 'testsite_zymichost_com_myuser');
define('DB_PASS', 'password');
define('DB_NAME', 'testsite_zymichost_com_mydb');
define('DEBUG', true);

$con = mysql_connect(DB_HOST, DB_USER, DB_PASS);

if(!$con)
{
   // error connecting
   if(DEBUG === true)
   {
     die('Database connection error: ' . mysql_error());
   }
   else
   {
      die('Failed to connect to the database.');
   }
}

if(!mysql_select_db(DB_NAME, $con))
{
   if(DEBUG === true)
   {
      die('Failed to select database, error: ' . mysql_error());
   }
   else
   {
      die('Failed to connect to database.');
   }
}
?>


MySQLi driver:

CODE
define('DB_HOST', 'localhost');
define('DB_USER', 'testsite_zymichost_com_myuser');
define('DB_PASS', 'password');
define('DB_NAME', 'testsite_zymichost_com_mydb');
define('DEBUG', true);

$db = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_PASS);

if(!$db)
{
    if(DEBUG === true)
    {
       die('Database connection error: ' . mysqli_connect_error());
    }
    else
    {
        die('Failed to connect to database.');
    }
}
?>


PDO Driver:

CODE
<?php
define('DB_HOST', 'localhost');
define('DB_USER', 'testsite_zymichost_com_myuser');
define('DB_PASS', 'password');
define('DB_NAME', 'testsite_zymichost_com_mydb');
define('DEBUG', true);

try
{
    $db = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS);
}
catch(PDOException $e)
{
    if(DEBUG === true)
    {
        die('Database connection error: ' . $e->getMessage());
    }
    else
    {
        die('Failed to connect to database.');
    }
}
?>


A couple of caveats; when creating a database, the name, the user and password only allows alpha-numerical input, other characters will cause it to fail.

That about wraps it up.
emzs
rolleyes.gif AAALLLL RRRIIGGHHTT - Im wanting to setup a photo viewing site for my wife to share family pics on. This need MySql database which is a mystery to me. I really appreciate the info / tutorial here
Thanks Emzs
Klausize
Thanks
hEakfall
Hi, im new in Zymic, i want to create a mysql database but the page http://www.hosting.zymic.com/user_db.jsp ('MySQL Database Management') is not working, i think that the buttons are not implemented, when i click them nothing happend.

PD: Im from Peru, mi english is not so good.
cybercity
someone help me with this plz is all right??

CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
</head>

<?php
define('DB_HOST', 'localhost');
define('DB_USER', 'cybercity_zxq_net_ok');
define('DB_PASS', 'mypassword');
define('DB_NAME', 'cybercity_zxq_net_data');
define('DEBUG', true);

$con = mysql_connect(DB_HOST, DB_USER, DB_PASS);

{
$date=date("d-m-Y");
$sql="INSERT INTO creditos (nombre, apellido, dni, direccion, barrio telefono, email) VALUES ('$nombre', '$apellido', '$dni', '$direccion', '$barrio', '$telefono', '$email')";
mysql_query($sql, $db);
print("Muchas gracias nos comunicaremos pronto !") ;
}
else
{
print("<a href=pagina2.php>Volver</a>");
}
?>


</body>
</html>


plz any help? i am new in mysql and php but i try!! sorry by my english
magfersile
well, first, can you tell me a bit more about what your script is doing and where you are getting the variables that you are using?
hEakfall
well, i cant connect to the phpmyadmin yet, i just create my database, my user and I granted privilegies to my user for connecting with my database. II just try with the usernames...

<username>
<username>@hosting.zymic.com
<username>@zymic.com
<username>@<databasename>

the password its oK, so , the problem is with the username, maybe there is something that i just dont know. What combination yuo guys use for connecting to phpmyadmin??

I just test phpmyadmin in my pc and it connect normally. I created a test database and a test username in my mysql.
natostr
How can i login to PHPMyAdmin? it alway wrong username-password. How username-password id right? please help me!!!!!!!!!!!!!!1 unsure.gif
shaomao
one quick question...
does the DB server (host) has to be 'localhost'?
can it be something else like a domain name or an IP address?
Valkirie
CODE
does the DB server (host) has to be 'localhost'?

Yes, it is localhost
stuart m
QUOTE(natostr @ Dec 14 2007, 04:34 AM) *
How can i login to PHPMyAdmin? it alway wrong username-password. How username-password id right? please help me!!!!!!!!!!!!!!1 unsure.gif


To login on phpmyadmin, just u need push on username, ur database name. and on password... ur password.


"Once you have successfully created a database you can use PHPMyAdmin which is a popular, powerful web-based interface for administrating MySQL databases. It is open source, written in PHP, and is among the better tools available for working with MySQL databases.

To login use your database username (e.g. site_99k_org_databasename) and the password assigned to that username."
wink.gif
wangqind
It works! yes, the host is only localhost, I tried all sorts of names and didn't expect it's so simple. thanks a lot.
rashad
Hi,
I want to connect to my database from a program (flashFormFactory), and when I try to connect to the database the program says "can't connect to database"
the program asks for a hostname, username, port, password.
I'm sure of th last tow things but the user name and hostname.....I'm not very sure about them.
my site url is : www.tamayoz.zzl.org
my database username is tamayoz_zzl_org_user

thnx in advance
Tom
Hostname = localhost
Username = database username you created
rashad
QUOTE(Tom @ Jan 17 2008, 10:26 PM) *
Hostname = localhost
Username = database username you created

I've already done that....But it doesn't work wacko.gif
thnx anyway wink.gif
Bread
QUOTE(rashad @ Jan 17 2008, 11:11 PM) *
I've already done that....But it doesn't work wacko.gif
thnx anyway wink.gif


What's your username? I've seen users where the name is too long it doesn't log in. What too long is... I'm not sure. Try a single character for the user, experiment a bit, I think the author has been informed.
Optimus
for me the "localhost" thing doesnt work.

username = adishpatel

site name : testsite111.zxq.net ( if it works i will redirect it )

Reply it soon.......
ned27
im having this problem:

Error type: 2
Error description: mysql_connect() [function.mysql-connect]: Access denied for user 'infosys'@'75.126.138.75' (using password: YES)
URL: infosysindigenous.zxq.net/database/sustainable_indigenous_fs_list.php?
Error file: /www/zxq.net/i/n/f/infosysindigenous/htdocs/database/include/dbconnection.php
Error line: 9

Can someone comment on this problem? thanks

I manage to correct the problem. I just need to edit the file dbcommon.php
ned27
what should be the mysql host of zymic? is it hosting.zymic.com? thanks waiting for reply.
Bread
QUOTE(ned27 @ Feb 12 2008, 05:24 AM) *
what should be the mysql host of zymic? is it hosting.zymic.com? thanks waiting for reply.


How about reading the thread?
Head
Can anyone help me? http://head.zzl.org/ (I have't done anything in PhpAdmin)
Crown
QUOTE(Bread @ Feb 12 2008, 06:34 AM) *
How about reading the thread?

LOL...Bread you see how many times it was said "$host=localhost" lol
ned27
thanks i manage to get around with the problems. thank you so much
Lsio
Thanks that helps a lot.

By the way, can you remotely connect Zymic MySQL server? and how?
Bread
QUOTE(Lsio @ Feb 14 2008, 09:02 PM) *
Thanks that helps a lot.

By the way, can you remotely connect Zymic MySQL server? and how?


Sorry, no, remote connections are not allowed.
blake_yo
i keep getting this error.

Could not connect to the database, see error message below.
Access denied for user 'vicious-designz_zxq_net_b'@'75.126.138.75' to database 'vicious-designz_zxq_net_php$$

type:MySQL
host:localhost
port:blank
database name:vicious-designz_zxq_net_php$$
user:vicious-designz_zxq_net_b
prefix:_phpbb

could someone help me out?
Jack
remove the $ character
blake_yo
QUOTE(Jack @ Feb 15 2008, 05:40 PM) *
remove the $ character


it is part of the name.
miek
I created a mysql database and username on monday not long before the zcp went down. I did not write down the info right away and no longer have access to get the db name and user name again. Would it be possible to have those emailed or pm'd to me?

website is hollywoodsocialites.zxp.net so I know they at least start with hollywoodsocialites_zxp_net.

Thanks, either way.
The Dark Lestat
Nothing works... I install and reinstall Invision Power Board but nothing seems to work. It always comes up with a page saying that it cannot find the page. why and can someone install it for me???
preSsured_stUd
QUOTE
why is it that my index page still doesnt show even though i changed it to "index.php"?
what should i do after that?
pls help me unsure.gif
Strongblade
I'm also running into configuation issues. Since I am a complete novice, I tried following direction (The images in the tutoral in the first post btw, no longer show up it seems) I did manage to successful create the mysql database though.

I am trying to see if the vbulletin forum I have is totally FUBAR. but to do so, I am going to have to figure out how to configure it to a MySQL database apparently.

CODE
// ****** MASTER DATABASE SERVER NAME AND PORT ******
// This is the hostname or IP address and port of the database server.
// If you are unsure of what to put here, leave the default values.
$config['MasterServer']['servername'] = 'db340.perfora.net';
$config['MasterServer']['port'] = 3306;
This is what is currently there probably from my old provider. I'm guessing I need to change it for this location though.

CODE
// ****** MASTER DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$config['MasterServer']['username'] = 'dbo184616360';
$config['MasterServer']['password'] = 'PTE5Zu7x';
Again, old data, I presume I need to put in the username and password I created when I created the MySQL database. Or is it my zymic account? Perhaps neither?


CODE
// ****** SLAVE DATABASE CONFIGURATION ******
// If you have multiple database backends, this is the information for your slave
// server. If you are not 100% sure you need to fill in this information,
// do not change any of the values here.
$config['SlaveServer']['servername'] = 'localhost';
$config['SlaveServer']['port'] = 3306;
$config['SlaveServer']['username'] = 'AdminID';
$config['SlaveServer']['password'] = '**********';
$config['SlaveServer']['usepconnect'] = 0;
I'm pretty sure I can figure out username and password. Localhost seems to be the consensus about servernames, but I haven't seen any info about a port number.

Everything else in the file seems normal or at least doesn't appear to need to be changed. Any help would be appreciated.

Strongblade!

foro cyberutiles
please renew images
bino4u
the host should b local host ....
Vamear
QUOTE
To login on phpmyadmin, just u need push on username, ur database name. and on password... ur password.


I think I've been having a similar problem when trying to launch PHPMyAdmin. I create a database and username, and then click on "LaunchPHPMyAdmin". The I am presented with a message where it asks me for a User Name and Password.

My question is, what do I put in each one? From what I hear the Uder Name is the database name, but I'm unclear what the password is. Is it the password for the user name I created, is it the password for my zymic account, or is it the password for my hosting account? I've tried a million different combinations but it doesn't work. mellow.gif

Can anyone help?!
Bread
QUOTE(Vamear @ Apr 25 2008, 04:17 PM) *
I think I've been having a similar problem when trying to launch PHPMyAdmin. I create a database and username, and then click on "LaunchPHPMyAdmin". The I am presented with a message where it asks me for a User Name and Password.

My question is, what do I put in each one? From what I hear the Uder Name is the database name, but I'm unclear what the password is. Is it the password for the user name I created, is it the password for my zymic account, or is it the password for my hosting account? I've tried a million different combinations but it doesn't work. mellow.gif

Can anyone help?!


User name is the one you create with the MySQL management, password is the one associated to that, see the tutorial for instructions on creating such an account.

If you're having problems, check the following:
  • Username does not contain any non-alphanumeric characters
  • Username is not too long

I don't know the exact length, but try and use a single character for the username and see if that works.
shadowcrawler
Hi i'm having trouble using the login script for my site: http://www.fail-inc.zzl.org

I follow the instructions from this site: http://php.about.com/od/finishedphp1/ss/php_login_code.htm

However the query bit on phpmyadmin doesn't seem to be working.

oh1
Hi,

Well I've done exactly as instructed here and tried to start phpMyAdmin. Access denied, every time.

Can anyone help?
TheInsubordinate
thanks for your help, i'm kind of new at this but you were the guiding light as it were
Irfan
what is the port to connect through FTP client?? i entered the host name as localhost den da username and da password too now i need the port
Davey90r
You have posted in completely the wrong place, but nevertheless...

FTP tutorial

Host should be your website address.

Username is the same but replace the first . (dot) with an @ symbol.

Password is your hosting password.

Port is 21.
kdtspartak
Your tutorials are great and your hosting free offers also.
Although i know now all i need to work in mysql or in ftp program, before it was a total mistery for me and i browsed for hours and hours to educate myself on line. Again: u have the best tutorial ive seen so far. And an advice to the ppl who have trouble connecting to mysql : keep it simple! example: database name = simple word
user = simple word and short!!
cool.gif
Bread
QUOTE(kdtspartak @ Jun 12 2008, 10:37 PM) *
Your tutorials are great and your hosting free offers also.
Although i know now all i need to work in mysql or in ftp program, before it was a total mistery for me and i browsed for hours and hours to educate myself on line. Again: u have the best tutorial ive seen so far. And an advice to the ppl who have trouble connecting to mysql : keep it simple! example: database name = simple word
user = simple word and short!!
cool.gif


Glad to know we've been of assistance smile.gif
TrashRabbit
Please help me! I'm in despair.

I'm trying to install Coppermine gallery. I can't get WHAT EXACTLY I need to write there. I've read a lot of topics but still...=(

I created db "gallery", it appears as sitename_gallery. Then I created username - "admin", which appears as sitename_admin. Right?
Then I assigned all privileges.
So in the mysql management page I can see following: Username - sitename_admin; Database Name - sitename_gallery; Table Name - *; Privileges - SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES. Right?

NOW!
MySQL Host : localhost
MySQL Database Name: sitename_gallery
MySQL Username : sitemane_admin
MySQL Password : ********


With this information I have following error:
Could not create a mySQL connection, please check the SQL values entered
MySQL error was : Access denied for user 'arcticmonkeys_ad'@'localhost' (using password: YES)

Also I've tried sitename_vndv_com_gallery, sitename_vndv_com_admin and sitemane_vndv_com_sitename_gallery, sitename_vndv_com_sitename_admin with the same result.
Where is mistake? What exactly I need to fill?

Help me please!
Bread
QUOTE(TrashRabbit @ Jun 13 2008, 02:51 PM) *
Please help me! I'm in despair.

I'm trying to install Coppermine gallery. I can't get WHAT EXACTLY I need to write there. I've read a lot of topics but still...=(

I created db "gallery", it appears as sitename_gallery. Then I created username - "admin", which appears as sitename_admin. Right?
Then I assigned all privileges.
So in the mysql management page I can see following: Username - sitename_admin; Database Name - sitename_gallery; Table Name - *; Privileges - SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES. Right?

NOW!
MySQL Host : localhost
MySQL Database Name: sitename_gallery
MySQL Username : sitemane_admin
MySQL Password : ********


With this information I have following error:
Could not create a mySQL connection, please check the SQL values entered
MySQL error was : Access denied for user 'arcticmonkeys_ad'@'localhost' (using password: YES)

Also I've tried sitename_vndv_com_gallery, sitename_vndv_com_admin and sitemane_vndv_com_sitename_gallery, sitename_vndv_com_sitename_admin with the same result.
Where is mistake? What exactly I need to fill?

Help me please!


Try a single character for a username; additionally I don't believe Coppermine works upon Zymic hosting, but this isn't related to MySQL.
TrashRabbit
QUOTE(Bread @ Jun 13 2008, 03:37 PM) *
Try a single character for a username; additionally I don't believe Coppermine works upon Zymic hosting, but this isn't related to MySQL.


Aww, thank you! I tried a single character and now it works! Thank you very much! You're gorgeous.
Btw, Coppermine works upon Zymic without any bugs, I've already used it.
cougarrr
I have been having similar login problems... I am trying to use Indexhibit I read something earlier about how some apps don't work with Zymic. Is this the case with Indexhibit? I've followed the tutorial as well as suggestions in this thread with no success. Help?
Sanjoy
QUOTE(stuart m @ Dec 22 2007, 05:24 PM) *
To login on phpmyadmin, just u need push on username, ur database name. and on password... ur password.
"Once you have successfully created a database you can use PHPMyAdmin which is a popular, powerful web-based interface for administrating MySQL databases. It is open source, written in PHP, and is among the better tools available for working with MySQL databases.

To login use your database username (e.g. site_99k_org_databasename) and the password assigned to that username."
wink.gif



Hi My database name is "airlinenews_airlines" and user name is "airlines_san" So what would be the User Name in Phpmyadmin? as the per above example it is bit unclear. I have tried all combinations but nothing works.
Davey90r
QUOTE(Sanjoy @ Jun 27 2008, 03:37 PM) *
Hi My database name is "airlinenews_airlines" and user name is "airlines_san" So what would be the User Name in Phpmyadmin? as the per above example it is bit unclear. I have tried all combinations but nothing works.


You must be mistaken somewhere... if your site's addess is airlinenews.vndv.com then your database name and username must both begin with airlinenews_

There username would be: airlinenews_san (or whatever you put when creating the database in the Zymic Control Panel).
multimer
Thnx for guide, but i think that you have very usefull steb-by-step interface in MySQL Management even for non-english speaking people
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.