Im learning web development for my graduation project, and I have been wondering if I could use nodejs for backend while making the database with MySQL and connecting both with php, is it possible or am I just gonna have to use other languages for the backend of the website?
JavaScript as a programming language can be used in both the backend or the frontend. The exchange of information between the frontend and backend is done with HTTP requests so the JS in the frontend does not directly operate with the language in the backend.
The most popular way to run JavaScript applications in the backend is through NodeJS. It is a little complex to learn, but rewarding! If you already know PHP, I suggest sticking with only PHP in the backend for now, unless you have a lot of time to spend studying.
PHP and JavaScript are not inter-operable; you can't combine both together in the same application. You can connect to or use MySQL with either.
If you want to start with building a JavaScript backend, find a tutorial covering NodeJS and Express.