You said in a commenting:
What I intend to do is something very simple to train some things like HTML5, CSS3 and javascript, I want to make a small "database" with names of movies I’ve watched and those I still want to see.
If you are using a server
And I recommend you use one, look for a package like xampp.
Do you really want to make a database in Mysql? Is it to learn how to handle SQL, or to make a dynamic website? For something like this I would forget SQL and use a json file on the server. You pull the file to Javascript with jQuery ajax.
File example:
[
{ "titulo": "ET", ano: 1982 },
{ "titulo": "Indiana Jones", ano: 1981 }
]
If it’s all local
You should be using a server.
In this case, create a JS file with a literal array:
var dados = [
{ titulo: 'ET', ano: 1982 },
{ titulo: 'Indiana Jones', ano: 1981 }
];
Remember that PHP is not the only way to interact with a database. The world of server-side programming is very diverse and you can use almost any programming language to generate your HTML and interact with the database.
– hugomg
It is possible to manipulate databases through Javascript, but the database has to be in the machine where the page will be opened, or by mapped network unit. In case the only browser I could use was internet explorer, the others block for security. But that gives, gives.
– Jose Eduardo