Jump to content

MySql Crearea bazei de date


andy47

Recommended Posts

MySql Tutorial

Multi dintre voi care sunteti noi va intrebati cum pot crea si connecta serverul la baza de date???

Baza de date poate fi gazduita pe un webhost.Daca nu aveti webhost va puteti conecta pe localhost cu ajutorul:

Eu va recomand wamp server.

Cum creez baza de date???

Intrati in gm/fs vostru si cautati functia mysql_connect acolo veti gasi ceva de genul:

mysql_connect(mysql_host,mysql_user,mysql_db,mysql_pass);
sau
mysql_connect ( "127.0.0.1", ".ANdy47.", "legend", "123123" );
daca ati gasit cum am aratat in primul exemplu va trebui sa cautati unde sunt definite mysql_host,mysql_user etc etc care vor arata asa
#define mysql_host "127.0.0.1"
#define mysql_user ".ANdy47."
#define mysql_db   "legend"
#define mysql_pass "123123"
in cazul meu baza mea de date se cheama legend pe care trebuie sa o creez aprindeti wamp/xammp server si intrati in localhost/phpmyadmin 259vb46.jpg Acum trebuie sa creez baza de date legend Dam click pe Baze de date [img width=500 height=375] muilbm.jpg introducem numele bazei de date repet in cazul meu legend [img width=500 height=375] or88pz.jpg apasam creare si baza de date a fost creata [img width=500 height=375] 14ioqv6.jpg acuma!!! aprindem serverul de samp dam click pe baza de date(in cazul meu legend) si tabelul se va crea in baza de date care va arata asa: [img width=500 height=375] 1zp1hqd.jpg dam click pe tabel( adica pe users) si va aparea structura tabelului: [img width=500 height=375] 55jekh.jpg scriptul pt aceasta structura este:
mysql_function_query(1,"CREATE TABLE IF NOT EXISTS `Users` (\
						`id` int(11) NOT NULL AUTO_INCREMENT, \
						`Name` varchar(24) NOT NULL, \
						`Password` varchar(129) NOT NULL, \
						`AdminLevel` int(20) NOT NULL, \
						PRIMARY KEY (`id`) \
						)", false,"","");

cam asta este tot acuma cn are ceva de comentat,adaugat  sau de injurat sa dea reply

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 7 months later...
  • 2 weeks later...
  • 4 weeks later...

O intrabare , daca am host si fac baza de dat cu wampp trebuie sa tin programul deschis mereu?

Si am intrat in wampp si cand intru pe localhost/phpmyadmin imi apare 

The webpage cannot be found

<a href="http://www.game-state.com/93.119.26.26:7777/"><img src="http://www.game-state.com/93.119.26.26:7777/350x20_FFFFFF_FFFFFF_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.