In search engines point of view, they are treated differently, and having the same website on both versions would be considered duplicate content and there will be a penalty. What you need to do is 301 redirect to the version you prefer. If you prefer the www.mysite.com version, then you will need to place the following code in your .htaccess file. This file is located under the web folder public_html/, and if there is no such file, you will need to create one or contact your host.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.