I just realized, information never dies! This video is 8 years old and turns out this information is exactly what i needed and how i needed it in 2022 😮💨. Thank you dude!
Robyn Bazsika You're a teacher you swine, you should know this shit and not have to google it in order to understand it - i hate you and your students.
Thank you for this video! My course notes weren't complete for the starting part and connection. This video saved me from a lot of headaches. The start is definitely the most difficult part.
It was a day saver for me! I tried 5-7 another PHP ways connect to the database on latest versions XAMPP Unsuccessfully. This video obviously showed the right way. Thank You very much.
Hi there, I wanted you to know how much I appreciate you video. Thank you very much. I've been having trouble connecting to database for like a whole day and then after watching this video, man its funny really. I put the password as root.
cool cool cook i watched a 100's of video regarding this, but all of that video no going success you are only the one who make it success 100% thank you so much voice tone amazing!!! i appreciate this video since 2013
No comments pointing out he used the $db variable twice? (Once to store the dbname and again to create the connection). Either way good video as this bit of information is often overlooked in the classroom...
Very Helpful thank you! As someone who struggles with learning PHP I thought this was one the best videos I've seen in a while. If you haven't done so would you consider doing a beginner PHP / MySqL Tutorial Series for phpMyAdmin. Preferably focus on more the PHP aspect but general overview of the others would amazing also.
This video is great. However, after creating a database using phMyAdmin, if I open the mysql shell via xampp control panel and query "Show databases" , I'm only seeing the 'test' database and not the one I created. How I do I access it using the shell?
I didt everything you did in the video, but when i open the connect.php (i have it in the right folder /htdocs) it loads infinitly. Does someone know why it is loading all time?
which program are you using in notepad++ to 'RUN' the php code? i lick run and it asks me to choose a program to run it. i dont know which program to choose.
This is what it says when I try to run mysql Status change detected: stopped 16:06:10 [mysql] Error: MySQL shutdown unexpectedly. 16:06:10 [mysql] This may be due to a blocked port, missing dependencies, 16:06:10 [mysql] improper privileges, a crash, or a shutdown by another method. 16:06:10 [mysql] Press the Logs button to view error logs and check 16:06:10 [mysql] the Windows Event Viewer for more clues 16:06:10 [mysql] If you need more help, copy and post this 16:06:10 [mysql] entire log window on the forums
I am unable to connect my database. it gives me error your php server doesn't have mysql module loaded or you cant use the mysql_(p) connect fuctions..can u suggest why?
thankss.. i question : we connect android to mysql database through localhost as we connect in java through mysql jdbc driver ? and the php script is neccessary to connect mysql database ?
THANK YOUUUUU!!!!... I was so close to giving up... thanks for the detail too... Do you have a video on how to link a user's password to the phpMyAdmin database?
I installed the xamp program on my own pc using Windows 10 and all seems fine and up and running but when i connect the mysql and follow your instruction its seems i am getting an error. I am not sure as to what is wrong here but something is telling me the directory folder for this script is incorrect. If i write basic php script all goes to plan using xamp but soemthing is telling me that the url of the data base is incorrect Any ideas?
move to fast... if you don't tell us and we can't see mouse motion we can't follow... I'm going to go here at 1:26 does not tell me anything or where you're going. But I did find it after going back twenty times.
sorry but when i'm running your code is giving that "sqli" was not found can you help me out on this one ?
10 ปีที่แล้ว
I started with these: define('DB_NAME', 'test'); /** Username MySQL */ define('DB_USER', 'root'); /** Password to the database MySQL */ define('DB_PASSWORD', ''); /** The server name MySQL */ define('DB_HOST', 'localhost'); And I get this messange: Could not establish database connection. Please check the username, password and hostname in the config file, and if necessary set up the appropriate MySQL user and privileges. Any idea?
Got it, after i added the port number it worked... (80 was occupied so i changed it to 81) but then how to connect was: localhost:81/phpmyadmin the panel like in the video came available then. GREAT
hi thanks for your great work. i tried at once and it worked but then i dont know what happened. when i load the connect.php file on the browser it echos the html content. what is happenning?
honestly i still dont understand how to create a file.sql ? like you write the script on an editor saved with an .sql i guess, but how do u connect it with ur php file that got the data ?
really ...thanks a lot !!!!!!!Your work is appreciable....it seemed so difficult but you made it easy :) I hope you will make more such videos all the best
i got one error Fatal error: Class 'mysql' not found in C:\XAMPP\htdocs\test\connect.php on line 9 on the line $db = new mysql('localhost', $user, $pass, $db) or die("unable to connect") ;
iam using vmware so that i used port 8080 in mysql so localhost:8080/myweb/conn.php is not working how i can get-rid of this problem Ken Swartwout plz?
Andrew Woods I checked the comments specifically for this question. I highly recommend putting a small correction text banner on the video for good habit formation of novice viewers
i keep getting this error do you kbow whats going on: Fatal error: Uncaught Error: Class 'mysqli' not found in C:\Users\Andy Lakraj\phpproject\index.php:9 Stack trace: #0 {main} thrown in C:\Users\Andy Lakraj\phpproject\index.php on line 9
Excellent tutorial it saved me lots of time and aggravation...Quick question do you know how to make this work with a copy of an existing wordpress site? I tried and I got "Error establishing a database connection" Please help Thanks
Kerley Vinas You certainly can make it work. The issue is likely that you need to copy the database over to your installation of XAMPP. You probably only have a copy of the html/css/scripts - the DB is a separate entity. It is easy enough to import/export through phpMyAdmin.
well i tried to connect to databse in xampp through brackets but it gives me error , while i verified that php code like echo" xxxx"; runs well, but could not connect with the database ,always get some error please help
I just realized, information never dies! This video is 8 years old and turns out this information is exactly what i needed and how i needed it in 2022 😮💨. Thank you dude!
now it's useful for me in 2024
10 years later I am watching these videos. Real G(Old) videos.
i'm a student and i'm here to say that your video still saves me, thanks a lot!
Thanks for making this video. I just started fooling around with MySQL and was following another tutorial that didn't explain this part at all.
This tutorial was not only exactly what I needed but well explained, clear, and slow but concise, thanks a lot!
Now connected after 10hrs of struggling with other videos .. Very helpful
For learning right click the XAMPP ICON and select" Run as Administrator", otherwise its easy to end up locked out. Thanks for the vid.
Thanks so much. I am just teaching MySQL and PHP to my High School Students. This is a great video and very informative.
Great to hear. Getting started is one of the more difficult parts of the process.
Robyn Bazsika You're a teacher you swine, you should know this shit and not have to google it in order to understand it - i hate you and your students.
Robyn Bazsika 22 Middleton Rd, Kew, Dunedin 9012 got u bitch
420blazeurmom acrossmaptomahawk im coming to teach ur students a real lesson \
for once
420blazeurmom acrossmaptomahawk .
7 years and still this video is lit!!!
Thank you for this video! My course notes weren't complete for the starting part and connection. This video saved me from a lot of headaches. The start is definitely the most difficult part.
Getting started can be intimidating. Very happy to help!
Thank you Ken. I have just started learning php. This video is of great help to me to create my database and first php program.
Great to hear. Getting started with a test bed like XAMPP is a large barrier to overcome!
ulearn
Thank you!
:)
I was trying to connect html form to my database, wasn't working.
But it's perfect now.
Simple and correct video.
It was a day saver for me! I tried 5-7 another PHP ways connect to the database on latest versions XAMPP Unsuccessfully. This video obviously showed the right way. Thank You very much.
finalllyyyy after trying for 3 days your way got this connected!
This guy's voice is cool, he made the video sound like a movie trailer. Thank you
Information never dies this is exactly what I need and it is from 9 years ago
😄😄😄
Hi there, I wanted you to know how much I appreciate you video. Thank you very much. I've been having trouble connecting to database for like a whole day and then after watching this video, man its funny really. I put the password as root.
When you are not sure exactly what you should be doing it can be a nightmare!
This is really easy to follow thanks for the great tutorial.
+Aheezy Da Islander You are welcome and thanks for the feedback.
cool cool cook
i watched a 100's of video regarding this, but all of that video no going success
you are only the one who make it success 100%
thank you so much
voice tone amazing!!!
i appreciate this video since 2013
No comments pointing out he used the $db variable twice? (Once to store the dbname and again to create the connection). Either way good video as this bit of information is often overlooked in the classroom...
assigned to a function mysqli with new prefix. i think both variable works differently even after having same name
Very Helpful thank you! As someone who struggles with learning PHP I thought this was one the best videos I've seen in a while. If you haven't done so would you consider doing a beginner PHP / MySqL Tutorial Series for phpMyAdmin. Preferably focus on more the PHP aspect but general overview of the others would amazing also.
Amazing and well explained tutorial.
thanks a lot.was misguided by other videos.saw yours and it worked.
this is the cleanest tutorial ever! thank you, god bless you!
Very good Video which easy to understand and thank you for sharing
Thank you Ken, I found this video a lot more helpful than other videos I found online
That´s the voice I want to have in my tutorials. Even if you´d be talking about how to eat pudding I would listen to you :)
This video is great. However, after creating a database using phMyAdmin, if I open the mysql shell via xampp control panel and query "Show databases" , I'm only seeing the 'test' database and not the one I created. How I do I access it using the shell?
Just used this works great. Any updated info I should look into?
I got it, so i'm giving you a thumbs up and because you don't move super fast and speak very plainly i.m going to subscribe...:-)
I didt everything you did in the video, but when i open the connect.php (i have it in the right folder /htdocs) it loads infinitly. Does someone know why it is loading all time?
which program are you using in notepad++ to 'RUN' the php code? i lick run and it asks me to choose a program to run it. i dont know which program to choose.
Good work done. uv really helped me in my assignment. Thumps Up......
Thank you so very much for the little series. Are you by chance going to do some more videos showing how to create and query databases?
Mike
This is really easy to follow thanks for the great tutorial. ☺
This is what it says when I try to run mysql
Status change detected: stopped
16:06:10 [mysql] Error: MySQL shutdown unexpectedly.
16:06:10 [mysql] This may be due to a blocked port, missing dependencies,
16:06:10 [mysql] improper privileges, a crash, or a shutdown by another method.
16:06:10 [mysql] Press the Logs button to view error logs and check
16:06:10 [mysql] the Windows Event Viewer for more clues
16:06:10 [mysql] If you need more help, copy and post this
16:06:10 [mysql] entire log window on the forums
Thanks Ken. Worked just the way you said it!
That is always good to hear. There are many places that the process can go the wrong direction
short and simple tutorials ,thanks dude
thanks for the support , that really worked , GREAT WORK !!!!
It can be access with different computers or guest ? Who connected to your hub.
Found this extremely useful, appreciate it
You are my hero! Thank you for this video!
Do you have a video on an event locator database..just like this one
+Ken Swartwout What should I do when I don't have a hosting (yet)?
+GoatSkills If you don't have a host, then a tool like XAMPP is exactly what you need. XAMPP (or similar tools) turn your local machine into a host.
Hi +Ken Swartwout , great tuturial. I just don't know where should i save the php file, i'm newbie on this stuff.
Thanks
+Rafael Marques, if you have installed xampp on tu pc, save ty php file in x:\xampp\htdocs
+Jesus Santisteban thanks, alteady did that:)
I am unable to connect my database. it gives me error your php server doesn't have mysql module loaded or you cant use the mysql_(p) connect fuctions..can u suggest why?
when i click on the admin button, it gives me error 404 not found message .
please tell me how tosolve this problem, please someone help me
thankss.. i question : we connect android to mysql database through localhost as we connect in java through mysql jdbc driver ? and the php script is neccessary to connect mysql database ?
Excellent video! Works Perfectly for me!
Arpan Das you don't work perfectly.
THANK YOUUUUU!!!!...
I was so close to giving up... thanks for the detail too...
Do you have a video on how to link a user's password to the phpMyAdmin database?
If i change my port for phpmyadmin,do i have to specify in the code too? or 'localhost' is all i need to write?
I installed the xamp program on my own pc using Windows 10 and all seems fine and up and running but when i connect the mysql and follow your instruction its seems i am getting an error. I am not sure as to what is wrong here but something is telling me the directory folder for this script is incorrect.
If i write basic php script all goes to plan using xamp but soemthing is telling me that the url of the data base is incorrect
Any ideas?
move to fast... if you don't tell us and we can't see mouse motion we can't follow... I'm going to go here at 1:26 does not tell me anything or where you're going. But I did find it after going back twenty times.
almost 9 years old , but still great tutorial
I've made a website but I cant save the data in the database which was entered by the user(me) in the website. I'm wondering whats wrong.
You're love man and of course TH-cam is love. Thanks
sorry but when i'm running your code is giving that "sqli" was not found
can you help me out on this one ?
I started with these:
define('DB_NAME', 'test');
/** Username MySQL */
define('DB_USER', 'root');
/** Password to the database MySQL */
define('DB_PASSWORD', '');
/** The server name MySQL */
define('DB_HOST', 'localhost');
And I get this messange:
Could not establish database connection. Please check the username, password and hostname in the config file, and if necessary set up the appropriate MySQL user and privileges.
Any idea?
Got it, after i added the port number it worked... (80 was occupied so i changed it to 81) but then how to connect was:
localhost:81/phpmyadmin
the panel like in the video came available then. GREAT
Thank you for this!
Hi Ken, great tuturial. I just don't know where should i save the php file, i'm newbie on this stuff.
Thanks
+Rafael Marques C drive->xampp->htdoc there u should make ur project folder and then just save it there...... Enjoy!!!
+Dev Chawda thank you !
+Rafael Marques But u should install Xampp 1st :)
+Dev Chawda i know that
hi thanks for your great work. i tried at once and it worked but then i dont know what happened. when i load the connect.php file on the browser it echos the html content. what is happenning?
Thanks bro
Love from India
honestly i still dont understand how to create a file.sql ? like you write the script on an editor saved with an .sql i guess, but how do u connect it with ur php file that got the data ?
really ...thanks a lot !!!!!!!Your work is appreciable....it seemed so difficult but you made it easy :)
I hope you will make more such videos
all the best
" your php server doesn’t have the mysql module loaded or you can’t use mysql_(p)connect function."
How do I fix this? Thanks
Make sure you have mysql running
You can start mysql in the control window that you can see in 0:05 in this video. Next to mysql is a start button.
thank you for clarifying that for me.. this is very much greatly appreciated sir.
i got one error Fatal error: Class 'mysql' not found in C:\XAMPP\htdocs\test\connect.php on line 9
on the line $db = new mysql('localhost', $user, $pass, $db) or die("unable to connect") ;
try changing "mysql" to "mysqli"
change mysql to mysqli
hey how do you get that notepad youre using.. i think my netbeans is making it more difficult for me
+jerry walker Notepad++. It is free and very popular. Give it a try!
iam using vmware so that i used port 8080 in mysql so localhost:8080/myweb/conn.php is not working
how i can get-rid of this problem Ken Swartwout plz?
I'm confused. You have two variables called $db. Why doesn't that cause an issue?
It just replaces the old variable as it runs from my guess..
I meant to call it $dbc, but as said below it works by overwriting the variable.
Andrew Woods I checked the comments specifically for this question. I highly recommend putting a small correction text banner on the video for good habit formation of novice viewers
it is good for new SQL code to reference the old as a template
amazing tutorial, clear,concise and exactly the tutorial i needed.
will "mysql_connect(host,user,password)" work.
if yes please tell me how. i am having a problem when i have used it.
i keep getting this error do you kbow whats going on:
Fatal error: Uncaught Error: Class 'mysqli' not found in C:\Users\Andy Lakraj\phpproject\index.php:9 Stack trace: #0 {main} thrown in C:\Users\Andy Lakraj\phpproject\index.php on line 9
Thank you, this is perfect for getting started!
+Vjera Turk thanx working
if u give a name to db then it will show error
so give as empty( $db='';) at ur third line
shouldnt we disconnect from the db ?
works good thanks
where in 3rd line?
Excellent tutorial it saved me lots of time and aggravation...Quick question do you know how to make this work with a copy of an existing wordpress site? I tried and I got "Error establishing a database connection" Please help Thanks
Kerley Vinas You certainly can make it work. The issue is likely that you need to copy the database over to your installation of XAMPP. You probably only have a copy of the html/css/scripts - the DB is a separate entity. It is easy enough to import/export through phpMyAdmin.
God bless! it works and you save me alot of works. thanks
I got this 'Parse error: syntax error, unexpected 'new' (T_NEW) in C:\xampp\htdocs', solution please ?
3:43 you said 'die' in strangely beautiful way
How else to say it
great tutorial, the best one for sure, clear and simple
it does not kick me to phpmyadmin HTTP Error 404. The requested resource is not found.
what can i do?
well i tried to connect to databse in xampp through brackets but it gives me error , while i verified that php code like echo" xxxx"; runs well, but could not connect with the database ,always get some error please help
what coding you using for connect.php
how do you access the db now bc i barely know sql
how can i create database on my computer only when i don't have phpmyadmin account set up already?
Very helpful video! Thank you so much!
wow very nice indeed great thank you verymuch sir. I was struggling past two days how to connect it helped me a lot.......... :) god may bless you
Finally code that works!
Why i can give you only 1 like? ....TOP
Hi, i did the same thing but it just shows my code when i run it ? how can i fix this
I don't really understund why you use the $db variable twice?
Well explained and concise. Thanks so much!
Thanks It Really Helpful for me.
Sir, will this also work on wamp server?
But one question, why would you have a password if you dont use it? I mean in the code....
Still i woudlnt name the $db variable the same as the connector, it causes unwanted confusion.
My point exactly....but great tutorial
i was stuck on this for so long just to hear you say the password was just a blanc space xD
Good job, Thank you for your tutorial.
thank you so much now I understand how it works , thank you again