How do you set database timezone for MySQL database?

I tried:

ALTER DATABASE SET TIME_ZONE = 'US/Eastern';


and it's not working, i get this error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET TIME_ZONE = 'US/Eastern'' at line 1

Did you mean : SET GLOBAL time_zone = 'US/Eastern';

when I type that I now get this error:

#1227 - Access denied; you need the SUPER privilege for this operation

I was assuming you were Dbadmin. So how about: SET time_zone = 'US/Eastern'; This will only last for as long as your session lasts!

Yes, I am the Dbadmin, im using PhpMyadmin and when i type the above, i now get:

#1298 - Unknown or incorrect time zone: 'US/Eastern'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.